java
java copied to clipboard
how to use tf.variable() in tf session eager mode ?
trafficstars
implicit val session = TestSession.createTestSession(TestSession.Mode.EAGER) // EagerSession.create()
implicit val tf = session.getTF // Ops.create(session).withName("test")
implicit val scope = **tf.scope()*
val weightInputGate = tf.variable(getWeightMatrix(weightGatesDims, scope)) the console error : Op VariableV2 is not valid in eager mode. ,because I need update the weight about weightInputGate,how to do in eagerSession model ,thanks