Skip to content

Commit e72fd53

Browse files
authored
Merge pull request #295 from PranovD/master
Added continue statement to as that is what is in the original python…
2 parents 2d28eef + edd5f51 commit e72fd53

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/TensorFlowNET.Core/Framework/meta_graph.py.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ public static (Dictionary<string, VariableV1>, ITensorOrOperation[]) import_scop
134134
}
135135
break;
136136
default:
137-
throw new NotImplementedException("import_scoped_meta_graph_with_return_elements");
137+
Console.WriteLine("import_scoped_meta_graph_with_return_elements");
138+
continue;
138139
}
139140
}
140141
}

src/TensorFlowNET.Core/Train/Optimizer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ public Operation apply_gradients(Tuple<Tensor, RefVariable>[] grads_and_vars, Re
199199

200200
if (!tf.context.executing_eagerly())
201201
{
202-
var train_op = ops.get_collection_ref(ops.GraphKeys.TRAIN_OP) as List<object>;
203-
if (!train_op.Contains(apply_updates))
202+
var train_op = ops.get_collection_ref(ops.GraphKeys.TRAIN_OP) as List<ITensorOrOperation>;
203+
if (train_op != null && train_op.Contains(apply_updates))
204204
train_op.Add(apply_updates);
205205
}
206206

0 commit comments

Comments
 (0)