339c0512c9faa6782cbd48464f6083e7611c0cba,onnxtf/backend.py,TensorflowBackend,run_node,#Any#Any#Any#Any#,109

Before Change


    output_vals = []
    with tf.Session() as sess:
      with tf.device(device_option):
        output_vals = map(sess.run, ops)
    return namedtupledict("Outputs", node.outputs)(*output_vals)

  @classmethod
  def _onnx_node_to_tensorflow_op(cls, node, input_dict):

After Change


      assert len(node.inputs) == len(inputs)
      feed_dict_raw = dict(zip(node.inputs, inputs))

    input_dict = dict([(x[0], tf.constant(x[1])) for x in \
                       feed_dict_raw.items()])
    ops = cls._onnx_node_to_tensorflow_op(node, input_dict)
    output_vals = []
    with tf.Session() as sess:
      with tf.device(device_option):
        output_vals = [sess.run(op) for op in ops]
    return namedtupledict("Outputs", node.outputs)(*output_vals)

  @classmethod
  def _onnx_node_to_tensorflow_op(cls, node, input_dict):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: onnx/onnx-tensorflow
Commit Name: 339c0512c9faa6782cbd48464f6083e7611c0cba
Time: 2017-10-22
Author: tian.jin1@ibm.com
File Name: onnxtf/backend.py
Class Name: TensorflowBackend
Method Name: run_node


Project Name: apache/incubator-tvm
Commit Name: 6be6363cc0e353d391e19c94646e7d35f6305805
Time: 2020-10-29
Author: tristan.konolige@gmail.com
File Name: python/tvm/auto_scheduler/measure.py
Class Name:
Method Name: local_builder_build


Project Name: databricks/spark-deep-learning
Commit Name: a36b70524b297f817d531bc832baff1543c51a3d
Time: 2018-04-23
Author: 1059168+yogeshg@users.noreply.github.com
File Name: python/sparkdl/estimators/keras_image_file_estimator.py
Class Name: KerasImageFileEstimator
Method Name: fitMultiple