I would like to know the difference bewteen NodeDef and OpDef in TensorFlow.
tf.Operation
represents a graph node in a TensorFlow Graph. It takes node_def
and a graph as input. What makes me confused is that it also takes op_def
as an optional input. In my understanding, a node can only correspond to one operation. So why bother?
tf.Operation(
node_def, g, inputs=None, output_types=None, control_inputs=None,
input_types=None, original_op=None, op_def=None
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…