We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3578c35 commit 0bcddfdCopy full SHA for 0bcddfd
src/TensorFlowNET.Core/Graphs/DefaultGraphStack.cs
@@ -39,7 +39,7 @@ public void set_controller(Graph @default)
39
40
public Graph get_controller()
41
{
42
- if (_stack.Count(x => x.IsDefault) == 0)
+ if (_stack.Count == 0 || _stack.Count(x => x.IsDefault) == 0)
43
_stack.Add(new StackModel {Graph = tf.Graph(), IsDefault = true});
44
for (var i = _stack.Count - 1; i >= 0; i--)
45
0 commit comments