e604607e0a26bd5ca244b60dba8769779f2f07a4,qanta/guesser/dan.py,DanGuesser,_guess_batch,#DanGuesser#Any#Any#,462

Before Change


        out = self.model(input_dict, lengths_dict, qnums)
        probs = F.softmax(out)
        scores, preds = torch.max(probs, 1)
        scores = scores.data.cpu().numpy()
        preds = preds.data.cpu().numpy()

        for p, s in zip(preds, scores):
            guesses.append([(self.i_to_ans[p], s)])

After 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([])
            for p in ps:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


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


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: e70bdb2d089ae283781c45b8d97963823a984baa
Time: 2017-12-15
Author: max.lapan@gmail.com
File Name: ch10/00_pong_pg.py
Class Name:
Method Name:


Project Name: AIRLab-POLIMI/mushroom
Commit Name: e304d4ee794a4cca8c116e52f99077ee71f87af1
Time: 2018-09-03
Author: carloderamo@gmail.com
File Name: mushroom/approximators/parametric/pytorch_network.py
Class Name: PyTorchApproximator
Method Name: predict


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