Skip to content

Commit

Permalink
disable TF_UpdateEdge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Oct 3, 2020
1 parent 8d32160 commit 69967b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TensorFlowNET.Core/Operations/Operation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,13 @@ public void _update_input(int index, Tensor tensor)

// Reset cached inputs.
_inputs_val = null;
_node_def = null;
// after the c_api call next time _inputs is accessed
// the updated inputs are reloaded from the c_api
lock (Locks.ProcessWide)
{
c_api.TF_UpdateEdge(_graph, output, input, tf.Status.Handle);
// disable
// c_api.TF_UpdateEdge(_graph, output, input, tf.Status.Handle);
//var updated_inputs = inputs;
tf.Status.Check();
}
Expand Down
1 change: 1 addition & 0 deletions test/TensorFlowNET.UnitTest/Tensorflow.UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="MethodBoundaryAspect.Fody" Version="2.0.138" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
Expand Down

0 comments on commit 69967b4

Please sign in to comment.