Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public EagerOperationBuilder addInputList(Output<?>[] inputs) {

@Override
public OperationBuilder addControlInput(Operation control) {
throw new UnsupportedOperationException(
"Control inputs are not supported in an eager execution environment");
// No-op. Any operations passed to this method will already be evaluated (b/c eager evaluation).
return this;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ public void addInputs() {
.addInput(tf.constant(true).asOutput())
.addInputList(new Output<?>[] {tf.constant(-1).asOutput()})
.build();
try {
opBuilder(session, "Const", "var").addControlInput(asrt);
fail();
} catch (UnsupportedOperationException e) {
// expected
}
opBuilder(session, "Const", "var").addControlInput(asrt);
}
}

Expand Down