9e563bfcdce1a8ca490667dd3f5ebcfa58269508,examples/memn2n_dialogue/interactive_utils.py,,interactive_loop,#Any#Any#,30

Before Change


            continue

        // If use_match_type add "cands_mat" to inputs
        data = {
            "memory": memory,
            "memory_mask": mem_mask,
            "user_utt": user_utt,
            "answer": None,
            "cands_mat": cands_mat
        }

        interactive_output = interactive_computation(data)
        pred_cand_idx = np.argmax(interactive_output["test_preds"][0])
        response = babi.candidate_answers[pred_cand_idx]

        print(response)

After Change


            context = old_context
            continue

        interactive_output = model.predict(np.expand_dims(memory, 0),
                                           np.expand_dims(user_utt, 0),
                                           np.expand_dims(cands_mat, 0))
        pred_cand_idx = interactive_output[0]
        response = babi.candidate_answers[pred_cand_idx]

        print(response)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NervanaSystems/nlp-architect
Commit Name: 9e563bfcdce1a8ca490667dd3f5ebcfa58269508
Time: 2018-07-24
Author: andy@nervanasys.com
File Name: examples/memn2n_dialogue/interactive_utils.py
Class Name:
Method Name: interactive_loop


Project Name: dask/dask-xgboost
Commit Name: 91db788cc3fa60962a159e9002a20b8930b6e314
Time: 2017-02-18
Author: mrocklin@gmail.com
File Name: dask_xgboost/tests/test_core.py
Class Name:
Method Name: test_dask


Project Name: dask/dask-xgboost
Commit Name: 91db788cc3fa60962a159e9002a20b8930b6e314
Time: 2017-02-18
Author: mrocklin@gmail.com
File Name: dask_xgboost/tests/test_core.py
Class Name:
Method Name: test_synchronous_api