java icon indicating copy to clipboard operation
java copied to clipboard

how to use tf.variable() in tf session eager mode ?

Open mullerhai opened this issue 3 years ago • 0 comments
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

mullerhai avatar May 26 '22 07:05 mullerhai