Browse Source

fixed the false-branch of the switch graph

tags/v0.9
Meinrad Recheis 6 years ago
parent
commit
40dccd362b
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/TensorFlowNET.Core/Operations/ControlFlows/CondContext.cs

+ 3
- 0
src/TensorFlowNET.Core/Operations/ControlFlows/CondContext.cs View File

@@ -207,6 +207,9 @@ namespace Tensorflow.Operations
_values.Add(real_val.name);
_external_values[real_val.name] = real_val;
}
var (t0, t1) = control_flow_ops._SwitchRefOrTensor(real_val, _pred);
real_val = new[] {t0, t1}[_branch];
_external_values[val.name] = real_val;
}
else
{


Loading…
Cancel
Save