Skip to content

Commit 29434d3

Browse files
author
Pranov Duggasani
committed
Added continue statement to as that is what is in the original python file and got rid off cast error
1 parent 3c266fb commit 29434d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ 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+
continue;
138138
}
139139
}
140140
}

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)