da1e8c2de9b265dcb18256a0a087165faf138b42,python/baseline/pytorch/seq2seq/model.py,EncoderDecoderModelBase,predict,#EncoderDecoderModelBase#Any#,149

Before Change


                if isinstance(value, list):
                    example[k] = np.array([value[b]])
                else:
                    example[k] = value[b].reshape((1,) + value[b].shape)
            inputs = self.make_input(example)
            encoder_outputs = self.encode(inputs, inputs["src_len"])
            batch.append(self.decoder.predict_one(inputs[src_field], encoder_outputs, **kwargs)[0])
        return batch

After Change


        are already transformed.
        
        self.eval()
        make = kwargs.get("make_input", True)
        if make:
            inputs, perm_idx = self.make_input(batch_dict, perm=True)
        else:
            inputs = batch_dict
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dpressel/mead-baseline
Commit Name: da1e8c2de9b265dcb18256a0a087165faf138b42
Time: 2019-01-14
Author: blester125@users.noreply.github.com
File Name: python/baseline/pytorch/seq2seq/model.py
Class Name: EncoderDecoderModelBase
Method Name: predict


Project Name: dpressel/mead-baseline
Commit Name: 7e3487729c18ce287d6c22f7f01945601fa76f85
Time: 2018-09-29
Author: dpressel@gmail.com
File Name: python/baseline/dy/embeddings.py
Class Name: CharConvEmbeddings
Method Name: __init__


Project Name: pyannote/pyannote-audio
Commit Name: b0a78567606a3ff24437501fc83239181b9478b3
Time: 2019-02-28
Author: pavel.korshunov@idiap.ch
File Name: pyannote/audio/features/utils.py
Class Name: RawAudio
Method Name: __call__