Browse Source

EagerResourceDeleter - Attempted to read or write protected memory #1051

tags/v0.100.5-BERT-load
Haiping Chen 2 years ago
parent
commit
6e6648b89b
2 changed files with 1 additions and 4 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Eager/EagerRunner.TFE_Execute.cs
  2. +0
    -3
      src/TensorFlowNET.Keras/BackendImpl.cs

+ 1
- 1
src/TensorFlowNET.Core/Eager/EagerRunner.TFE_Execute.cs View File

@@ -42,7 +42,7 @@ namespace Tensorflow.Eager
object[] attrs, object[] attrs,
int num_outputs) int num_outputs)
{ {
var status = tf.Status;
var status = new Status();
var op = GetOp(ctx, op_name, status); var op = GetOp(ctx, op_name, status);
c_api.TFE_OpSetDevice(op, device_name, status); c_api.TFE_OpSetDevice(op, device_name, status);
if (status.ok()) if (status.ok())


+ 0
- 3
src/TensorFlowNET.Keras/BackendImpl.cs View File

@@ -138,9 +138,6 @@ namespace Tensorflow.Keras
ops.set_default_session(tf.Session(ops.get_default_graph())); ops.set_default_session(tf.Session(ops.get_default_graph()));
tf.enable_eager_execution(); tf.enable_eager_execution();
tf.Runner.ClearEagerOperationMap(); tf.Runner.ClearEagerOperationMap();

GC.Collect();
GC.WaitForPendingFinalizers();
} }
public void manual_variable_initialization(bool value) public void manual_variable_initialization(bool value)
{ {


Loading…
Cancel
Save