(self)
Return state of all layers as query for attention
Return state of all layers as query for attention
Return state of all layers as query for attention
def get_query(self):
        ''' Return state of all layers as query for attention '''
        if self.enable_cell:
            return self.hidden_state[0].transpose(0, 1).reshape(-1, self.dim*self.layer)
        else:
            return self.hidden_state.transpose(0, 1).reshape(-1, self.dim*self.layer)
def get_query ( self ) : if self . enable_cell : return self . hidden_state [ 0 ] . transpose ( 0 , 1 ) . reshape ( - 1 , self . dim * self . layer ) else : return self . hidden_state . transpose ( 0 , 1 ) . reshape ( - 1 , self . dim * self . layer )