a2a5ca90ab475392100abe1cb3530f4edbf117e7,models/experimental/resnet50_keras/resnet50_tf2.py,,main,#Any#,168

Before Change


  logging.info("Training model using data in directory "%s".", FLAGS.data)

  with tf.device("/job:worker"):
    with strategy.scope():
      logging.info("Building Keras ResNet-50 model")
      model = resnet_model.ResNet50(num_classes=NUM_CLASSES)

      logging.info("Compiling model.")
      metrics = ["sparse_categorical_accuracy"]

      if FLAGS.eval_top_5_accuracy:
        metrics.append(sparse_top_k_categorical_accuracy)

      model.compile(
          optimizer=tf.keras.optimizers.SGD(
              learning_rate=BASE_LEARNING_RATE, momentum=0.9, nesterov=True),
          loss="sparse_categorical_crossentropy",
          metrics=metrics)

    imagenet_train = imagenet_input.ImageNetInput(
        is_training=True, data_dir=FLAGS.data, batch_size=batch_size,
        use_bfloat16=USE_BFLOAT16)
    imagenet_eval = imagenet_input.ImageNetInput(

After Change


  logging.info("Enable top 5 accuracy: %s.", FLAGS.eval_top_5_accuracy)
  logging.info("Training model using data in directory "%s".", FLAGS.data)

  with strategy.scope():
    logging.info("Building Keras ResNet-50 model")
    model = resnet_model.ResNet50(num_classes=NUM_CLASSES)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: tensorflow/tpu
Commit Name: a2a5ca90ab475392100abe1cb3530f4edbf117e7
Time: 2019-08-06
Author: rxsang@google.com
File Name: models/experimental/resnet50_keras/resnet50_tf2.py
Class Name:
Method Name: main


Project Name: tensorflow/tpu
Commit Name: a2a5ca90ab475392100abe1cb3530f4edbf117e7
Time: 2019-08-06
Author: rxsang@google.com
File Name: models/experimental/resnet50_keras/resnet50_ctl_tf2.py
Class Name:
Method Name: main


Project Name: deepmind/sonnet
Commit Name: bde4d188c147cb27b55c8b6c76bff14c0d490af8
Time: 2019-09-18
Author: tomhennigan@google.com
File Name: sonnet/src/replicator.py
Class Name: TpuReplicator
Method Name: scope


Project Name: deepmind/sonnet
Commit Name: c787becf4d41944658591ea63ff56e4661ebc3eb
Time: 2019-10-30
Author: tomhennigan@google.com
File Name: sonnet/src/replicator.py
Class Name: Replicator
Method Name: scope