You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tf.variable with initial value does not work in eager mode #155
As the title says, tf.variable with an initial value does not work in eager mode. I'm not sure if it is supposed to, as tf.Variable does in the python api but apparently didn't at first. Interestingly, it's not the variable op that fails, it's the assign:
* Only supported on Graph sessions as the {@link org.tensorflow.op.core.Assign} op
I couldn't figure out an alternative at the time and needed it for the optimizers work. We should at minimum fix it so it throws a sensible looking exception.
Activity
Craigacp commentedon Nov 21, 2020
Yeah, that's documented in the javadoc:
java/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Helpers.java
Line 40 in 8c67a5a
I couldn't figure out an alternative at the time and needed it for the optimizers work. We should at minimum fix it so it throws a sensible looking exception.
rnett commentedon Nov 21, 2020
Could be done easily enough as part of #154, that's what I was originally going to suggest before I realized it was supported in python eager mode.
I assume the codegen doesn't support custom javadocs on the ops methods (for putting the warning on
tf.variable)?