981e4266d4ea816b08a762193bd52f40cd1a3242,examples/mnist/keras/mnist_inference.py,,inference,#,26

Before Change


  while True:
    try:
      // get images and labels from tf.data.Dataset
      img, lbl = sess.run(["inf_image:0", "inf_image:1"])

      // inference by feeding these images and labels into the input tensors
      // you can view the exported model signatures via:

After Change


  output_file = tf.io.gfile.GFile("{}/part-{:05d}".format(args.output, worker_num), mode="w")

  for batch in ds:
    predictions = predict(conv2d_input=batch[0])
    labels = np.reshape(batch[1], -1).astype(np.int)
    preds = np.argmax(predictions["dense_1"], axis=1)
    for x in zip(labels, preds):
      output_file.write("{} {}\n".format(x[0], x[1]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference


Project Name: databricks/spark-deep-learning
Commit Name: a5a6e074ed792733fc2547e1544711d52659d3fd
Time: 2017-07-11
Author: sueann@databricks.com
File Name: python/tests/transformers/named_image_test.py
Class Name: NamedImageTransformerBaseTestCase
Method Name: setUpClass


Project Name: suavecode/SUAVE
Commit Name: fb0cd705391dc618f5434f3562b6a6de8e1974f9
Time: 2018-10-30
Author: mclarke2@stanford.edu
File Name: trunk/SUAVE/Analyses/Aerodynamics/AVL_Inviscid.py
Class Name: AVL_Inviscid
Method Name: evaluate


Project Name: suavecode/SUAVE
Commit Name: 2ecd2e8b502ced510ff4c940ac675802363c1c30
Time: 2018-10-30
Author: mclarke2@stanford.edu
File Name: trunk/SUAVE/Analyses/Aerodynamics/AVL_Inviscid.py
Class Name: AVL_Inviscid
Method Name: evaluate