222302c5344f355c9b81ae199a99f985fd0d788f,api-examples/eager_tagger_tf.py,,,#,137

Before Change


    // Training loop - using batches of 32
    loss_acc = 0.
    step = 0
    start = time.time()
    for x, y in train_input_fn():
        // Optimize the model
        loss_value = optim.update(model, x, y)

        loss_acc += loss_value
        step += 1

    print("training time {}".format(time.time() - start))
    mean_loss = loss_acc / step
    print("Training Loss {}".format(mean_loss))

After Change




num_epochs = args.epochs
timer = Timer()
for epoch in range(num_epochs):


    // Training loop - using batches of 32
    loss_acc = 0.
    step = 0
    timer.start()
    for x, y in train_input_fn():
        // Optimize the model
        loss_value = optim.update(model, x, y)

        loss_acc += loss_value
        step += 1

    print("training time {}".format(timer.elapsed()))
    mean_loss = loss_acc / step
    print("Training Loss {}".format(mean_loss))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: dpressel/mead-baseline
Commit Name: 222302c5344f355c9b81ae199a99f985fd0d788f
Time: 2021-04-10
Author: dpressel@gmail.com
File Name: api-examples/eager_tagger_tf.py
Class Name:
Method Name:


Project Name: dpressel/mead-baseline
Commit Name: 222302c5344f355c9b81ae199a99f985fd0d788f
Time: 2021-04-10
Author: dpressel@gmail.com
File Name: api-examples/layers_classify_pytorch.py
Class Name:
Method Name:


Project Name: dpressel/mead-baseline
Commit Name: 222302c5344f355c9b81ae199a99f985fd0d788f
Time: 2021-04-10
Author: dpressel@gmail.com
File Name: api-examples/layers_classify_tf.py
Class Name:
Method Name:


Project Name: dpressel/mead-baseline
Commit Name: 222302c5344f355c9b81ae199a99f985fd0d788f
Time: 2021-04-10
Author: dpressel@gmail.com
File Name: api-examples/eager_tagger_tf.py
Class Name:
Method Name: