8000 EagerResourceDeleter - Attempted to read or write protected memory #1051 · SciSharp/TensorFlow.NET@6e6648b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e6648b

Browse files
committed
EagerResourceDeleter - Attempted to read or write protected memory #1051
1 parent 8b53eb3 commit 6e6648b

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/TensorFlowNET.Core/Eager/EagerRunner.TFE_Execute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public Tensor[] TFE_ExecuteCancelable(Context ctx,
4242
object[] attrs,
4343
int num_outputs)
4444
{
45-
var status = tf.Status;
45+
var status = new Status();
4646
var op = GetOp(ctx, op_name, status);
4747
c_api.TFE_OpSetDevice(op, device_name, status);
4848
if (status.ok())

src/TensorFlowNET.Keras/BackendImpl.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ public void clear_session()
138138
ops.set_default_session(tf.Session(ops.get_default_graph()));
139139
tf.enable_eager_execution();
140140
tf.Runner.ClearEagerOperationMap();
141-
142-
GC.Collect();
143-
GC.WaitForPendingFinalizers();
144141
}
145142
public void manual_variable_initialization(bool value)
146143
{

0 commit comments

Comments
 (0)
0