054095d922edda5134e520522bc82a1b95cc5bd4,onnx_tf/backend.py,TensorflowBackend,run_node,#Any#Any#Any#Any#Any#,167

Before Change


      with tf.compat.v1.Session() as sess:
        with tf.device(device_option):
          sess.run(tf.compat.v1.global_variables_initializer())
          output_vals = sess.run(ops)

    return namedtupledict("Outputs", node.outputs)(*output_vals)

  @classmethod

After Change


    module = TFModule(node)

    output_vals = module(**input_dict)
    output_vals = [val.numpy() if isinstance(val, tf.Tensor) else val for val in output_vals]

    return namedtupledict("Outputs", node.outputs)(*output_vals)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: onnx/onnx-tensorflow
Commit Name: 054095d922edda5134e520522bc82a1b95cc5bd4
Time: 2020-09-09
Author: smonov@gmail.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: run_node


Project Name: onnx/onnx-tensorflow
Commit Name: 054095d922edda5134e520522bc82a1b95cc5bd4
Time: 2020-09-09
Author: smonov@gmail.com
File Name: onnx_tf/backend_rep.py
Class Name: TensorflowRep
Method Name: run


Project Name: rlworkgroup/garage
Commit Name: d8c279e1573ab16fa4c9ba7a89a0cc5012f0caac
Time: 2019-03-28
Author: ryanjulian@users.noreply.github.com
File Name: garage/logger/tensor_board_output.py
Class Name: TensorBoardOutput
Method Name: _record_kv