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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: tensorflow/minigo
Commit Name: b32a4724dd2f8c97ff3b3813e5622d6bb6fb8f7a
Time: 2018-01-15
Author: brian.kihoon.lee@gmail.com
File Name: dual_net.py
Class Name: DualNetwork
Method Name: run_many


Project Name: baldassarreFe/deep-koalarization
Commit Name: 6a00feac200b4f3d0fd5fb5641e38de4a06710d6
Time: 2017-05-05
Author: baldassarre.fe@gmail.com
File Name: dataset/batch.py
Class Name: ImagenetBatcher
Method Name: batch_all