28d8021977b9d811f84543ed85d5f011bc3695c6,src/asr.py,Decoder,get_state,#Decoder#,191

Before Change



    def get_state(self):
        """ Return all hidden states/cells, for decoding purpose"""
        state_list = [s.cpu() for s in self.state_list]
        if self.enable_cell:
            cell_list = [c.cpu() for c in self.cell_list]
            return state_list, cell_list
        return state_list

After Change


    def get_state(self):
        """ Return all hidden states/cells, for decoding purpose"""
        if self.enable_cell:
            return (self.hidden_state[0].cpu(),self.hidden_state[1].cpu())
        else:
            return self.hidden_state.cpu()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: Alexander-H-Liu/End-to-end-ASR-Pytorch
Commit Name: 28d8021977b9d811f84543ed85d5f011bc3695c6
Time: 2019-09-27
Author: alexliu36@gmail.com
File Name: src/asr.py
Class Name: Decoder
Method Name: get_state


Project Name: facebookresearch/ParlAI
Commit Name: 52be96bb254a48305064af8b4cbde803d8e83b51
Time: 2019-08-14
Author: edinan@fb.com
File Name: parlai/core/torch_ranker_agent.py
Class Name: TorchRankerAgent
Method Name: _get_train_preds


Project Name: dmlc/dgl
Commit Name: 117dd25204611382acc7c9f460aeeb3a023ef721
Time: 2021-02-08
Author: coin2028@hotmail.com
File Name: new-tutorial/L1_large_node_classification.py
Class Name:
Method Name: