8f74f45d3a17b6f53d11516df43062f5a69381b4,examples/basic_tutorials/4_mnist_mlp_eager_mode_dynamic.py,,,#,48

Before Change



        train_loss, train_acc, n_iter = 0, 0, 0
        for X_batch, y_batch in tl.iterate.minibatches(X_train, y_train, batch_size, shuffle=False):
            _logits = MLP(X_batch, foo=1).outputs
            train_loss += tl.cost.cross_entropy(_logits, y_batch, name="eval_loss")
            train_acc += np.mean(np.equal(np.argmax(_logits, 1), y_batch))
            n_iter += 1
        print("   train foo=1 loss: {}".format(train_loss / n_iter))
        print("   train foo=1 acc:  {}".format(train_acc / n_iter))

After Change



        train_loss, train_acc, n_iter = 0, 0, 0
        for X_batch, y_batch in tl.iterate.minibatches(X_train, y_train, batch_size, shuffle=False):
            _logits = MLP(X_batch, foo=1)
            train_loss += tl.cost.cross_entropy(_logits, y_batch, name="eval_loss")
            train_acc += np.mean(np.equal(np.argmax(_logits, 1), y_batch))
            n_iter += 1
        print("   train foo=1 loss: {}".format(train_loss / n_iter))
        print("   train foo=1 acc:  {}".format(train_acc / n_iter))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 9

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 8f74f45d3a17b6f53d11516df43062f5a69381b4
Time: 2019-02-24
Author: jingqing.zhang15@imperial.ac.uk
File Name: examples/basic_tutorials/4_mnist_mlp_eager_mode_dynamic.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 8f74f45d3a17b6f53d11516df43062f5a69381b4
Time: 2019-02-24
Author: jingqing.zhang15@imperial.ac.uk
File Name: examples/basic_tutorials/2_mnist_mlp_graph_mode_model2layer.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 8f74f45d3a17b6f53d11516df43062f5a69381b4
Time: 2019-02-24
Author: jingqing.zhang15@imperial.ac.uk
File Name: examples/basic_tutorials/2_mnist_mlp_graph_mode.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 8f74f45d3a17b6f53d11516df43062f5a69381b4
Time: 2019-02-24
Author: jingqing.zhang15@imperial.ac.uk
File Name: examples/basic_tutorials/1_mnist_mlp_eager_mode_model2layer.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 8f74f45d3a17b6f53d11516df43062f5a69381b4
Time: 2019-02-24
Author: jingqing.zhang15@imperial.ac.uk
File Name: examples/basic_tutorials/1_mnist_mlp_eager_mode.py
Class Name:
Method Name: