e79449afe45f4da6f1756a7d92bdd3cd6618c638,qanta/guesser/dan.py,DanGuesser,_guess_batch,#DanGuesser#,434

Before Change



        out = self.model(input_dict, lengths_dict, qnums)
        probs = [p for p in F.softmax(out).data.cpu().numpy()]
        logits = [l for l in out.data.cpu().numpy()]
        preds = [np.argsort(-l)[:10] for l in logits]
        guesses = []
        for i, ps in enumerate(preds):
            guesses.append([])

After Change


        guesses = []
        out = self.model(input_dict, lengths_dict, qnums)
        probs = F.softmax(out).data.cpu().numpy()
        n_examples = probs.shape[0]
        preds = np.argsort(-probs, axis=1)
        for i in range(n_examples):
            guesses.append([])
            for p in preds[i][:max_n_guesses]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: Pinafore/qb
Commit Name: e79449afe45f4da6f1756a7d92bdd3cd6618c638
Time: 2018-04-25
Author: sjtufs@gmail.com
File Name: qanta/guesser/dan.py
Class Name: DanGuesser
Method Name: _guess_batch


Project Name: leftthomas/SRGAN
Commit Name: 1433d4c435a253e891009b08a9280bc452087db0
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: test.py
Class Name:
Method Name:


Project Name: mapbox/robosat
Commit Name: 9a8d91022cfde0a380d8700be76d6ddbd716a2af
Time: 2018-09-12
Author: o@courtin.co
File Name: robosat/tools/train.py
Class Name:
Method Name: validate


Project Name: mapbox/robosat
Commit Name: 9a8d91022cfde0a380d8700be76d6ddbd716a2af
Time: 2018-09-12
Author: o@courtin.co
File Name: robosat/tools/train.py
Class Name:
Method Name: train