4a3c7ac04d2dfad89681099658a1f5c05858ce19,inference.py,,do_inference,#,82

Before Change


        sys.stdout = open(os.devnull, "w")

    // Spawn new session
    with tf.Session(graph=infer_model.graph, config=nmt.utils.get_config_proto()) as sess:

        // Load model
        loaded_infer_model = nmt.inference.model_helper.load_model(infer_model.model, flags.ckpt, sess, "infer")

After Change




        // calculate number of translations to be returned
        if hparams.infer_mode == "greedy":
            num_translations_per_input = 1
        elif hparams.infer_mode == "beam_search":
            num_translations_per_input = min(hparams.num_translations_per_input, hparams.beam_width)

        answers = []
        while True:
            try:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: daniel-kukiela/nmt-chatbot
Commit Name: 4a3c7ac04d2dfad89681099658a1f5c05858ce19
Time: 2019-09-18
Author: daniel@kukiela.pl
File Name: inference.py
Class Name:
Method Name: do_inference


Project Name: google/unrestricted-adversarial-examples
Commit Name: 6a13cc9c10f2f70f5b2eb44cc84d56d366d542cd
Time: 2018-08-28
Author: nottombrown@gmail.com
File Name: unrestricted-advex/unrestricted_advex/mnist_baselines/evaluate_tcu_mnist.py
Class Name:
Method Name:


Project Name: cheungdaven/DeepRec
Commit Name: c6209547645477e77547e5bd2c6d58bb461f9642
Time: 2018-05-13
Author: cheungdaven@gmail.com
File Name: Test/testRatingPred.py
Class Name:
Method Name: