090944e816fd3ff8e861fba4452851e0a901491d,scripts/language_model/large_word_language_model.py,,train,#,193

Before Change


                    output, h, new_target = model(X, y, h, s)
                    output = output.reshape((-3, -1))
                    new_target = new_target.reshape((-1,))
                    l = loss(output, new_target) * m.reshape((-1,))
                    Ls.append(l/args.batch_size)
                    hiddens[j] = h

After Change


            for _ in range(len(data)):
                hidden, ls = parallel.get()
                // hidden states are ordered by context id
                index = context.index(hidden[0].context)
                hiddens[index] = hidden
                Ls.append(ls)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 090944e816fd3ff8e861fba4452851e0a901491d
Time: 2019-01-28
Author: linhaibin.eric@gmail.com
File Name: scripts/language_model/large_word_language_model.py
Class Name:
Method Name: train


Project Name: deepchem/deepchem
Commit Name: 1b30f4d2aff0f40811aeff58e745bbed01e184f9
Time: 2017-01-22
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/sequential.py
Class Name: Sequential
Method Name: add_loss


Project Name: pyprob/pyprob
Commit Name: 9fdab05b168bd254a2ed3f1bbf2eb37ddad85dc1
Time: 2017-05-06
Author: atilimgunes.baydin@gmail.com
File Name: infcomp/modules.py
Class Name: Artifact
Method Name: valid_loss