|
|
@@ -44,7 +44,6 @@ namespace Tensorflow |
|
|
|
public partial class Operation : ITensorOrOperation |
|
|
|
{ |
|
|
|
private readonly IntPtr _handle; // _c_op in python |
|
|
|
private readonly IntPtr _operDesc; |
|
|
|
private readonly Graph _graph; |
|
|
|
private NodeDef _node_def; |
|
|
|
|
|
|
@@ -91,7 +90,7 @@ namespace Tensorflow |
|
|
|
{ |
|
|
|
_graph = g; |
|
|
|
|
|
|
|
_operDesc = c_api.TF_NewOperation(g, opType, oper_name); |
|
|
|
var _operDesc = c_api.TF_NewOperation(g, opType, oper_name); |
|
|
|
c_api.TF_SetAttrType(_operDesc, "dtype", TF_DataType.TF_INT32); |
|
|
|
lock (Locks.ProcessWide) |
|
|
|
using (var status = new Status()) |
|
|
@@ -161,7 +160,7 @@ namespace Tensorflow |
|
|
|
op_def = g.GetOpDef(node_def.Op); |
|
|
|
|
|
|
|
var grouped_inputs = _reconstruct_sequence_inputs(op_def, inputs, node_def.Attr); |
|
|
|
(_handle, _operDesc) = ops._create_c_op(g, node_def, grouped_inputs, control_input_ops.ToArray()); |
|
|
|
_handle = ops._create_c_op(g, node_def, grouped_inputs, control_input_ops.ToArray()); |
|
|
|
|
|
|
|
// Initialize self._outputs. |
|
|
|
output_types = new TF_DataType[NumOutputs]; |
|
|
@@ -170,7 +169,7 @@ namespace Tensorflow |
|
|
|
|
|
|
|
_outputs = new Tensor[NumOutputs]; |
|
|
|
for (int i = 0; i < NumOutputs; i++) |
|
|
|
_outputs[i] = new Tensor(this, i, OutputType(i)); |
|
|
|
_outputs[i] = new Tensor(this, i, output_types[i]); |
|
|
|
|
|
|
|
graph._add_op(this); |
|
|
|
|
|
|
|