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