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

Before Change


      // note that we feed directly into the graph tensors (bypassing the exported signatures)
      // these tensors will be shown in the "name" field of the signature definitions

      outputs = sess.run(["dense_2/Softmax:0"], feed_dict={"Placeholder:0": img})
      for p in outputs[0]:
        output_file.write("{}\n".format(np.argmax(p)))
    except tf.errors.OutOfRangeError:
      break

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]))

  output_file.close()


if __name__ == "__main__":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

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: tensorflow/models
Commit Name: 8da4857396fcedb1abd19a08cd4de40d16c7bc50
Time: 2020-08-17
Author: 30733558+plakal@users.noreply.github.com
File Name: research/audioset/yamnet/yamnet_test.py
Class Name: YAMNetTest
Method Name: clip_test


Project Name: pliablepixels/zmeventnotification
Commit Name: 1e619d91956c813d2328a5460da0a273fe135905
Time: 2019-11-15
Author: pliablepixels@gmail.com
File Name: hook/zmes_hook_helpers/face.py
Class Name: Face
Method Name: detect


Project Name: explosion/thinc
Commit Name: d6d7cb7db51776b026514a1a2caa4073b9e998ad
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: pad