Skip to content

Commit f41d6bc

Browse files
committed
Add TF_UpdateEdge APIs.
1 parent 5f2df56 commit f41d6bc

4 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/TensorFlowNET.Core/APIs/c_api.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace Tensorflow
4343
/// </summary>
4444
public partial class c_api
4545
{
46-
public const string TensorFlowLibName = @"C:\Users\haipi\Documents\Projects\tensorflow\bazel-bin\tensorflow\tensorflow";
46+
public const string TensorFlowLibName = "tensorflow";
4747

4848
public static string StringPiece(IntPtr handle)
4949
{

src/TensorFlowNET.Core/Graphs/Graph.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,7 @@ public Operation create_op(string op_type, Tensor[] inputs, TF_DataType[] dtypes
278278
// after removing the trailing '/'.
279279
name = name.EndsWith("/") ? ops.name_from_scope_name(name) : unique_name(name);
280280
var node_def = ops._NodeDef(op_type, name, attrs: attrs);
281-
if (name == "rnn/while/basic_rnn_cell/MatMul"
282-
|| name == "rnn/while/basic_rnn_cell/MatMul/Enter")
283-
{
284281

285-
}
286282
var input_ops = inputs.Select(x => x.op).ToArray();
287283
var control_inputs = _control_dependencies_for_inputs(input_ops);
288284

src/TensorFlowNET.Core/Graphs/c_api.graph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,6 @@ public static extern void TF_GraphSetOutputHandleShapesAndTypes(IntPtr graph, TF
321321
/// <param name="status">TF_Status*</param>
322322
[DllImport(TensorFlowLibName)]
323323

324-
public static extern void UpdateEdge(IntPtr graph, TF_Output new_src, TF_Input dst, SafeStatusHandle status);
324+
public static extern void TF_UpdateEdge(IntPtr graph, TF_Output new_src, TF_Input dst, SafeStatusHandle status);
325325
}
326326
}

src/TensorFlowNET.Core/Operations/Operation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public void _update_input(int index, Tensor tensor)
326326
// the updated inputs are reloaded from the c_api
327327
lock (Locks.ProcessWide)
328328
{
329-
c_api.UpdateEdge(_graph, output, input, tf.Status.Handle);
329+
c_api.TF_UpdateEdge(_graph, output, input, tf.Status.Handle);
330330
//var updated_inputs = inputs;
331331
tf.Status.Check();
332332
}

0 commit comments

Comments
 (0)