Skip to content

Commit ce86b4a

Browse files
shraman-rcmn-robot
authored andcommitted
Fix ConfigurableOpsTest.testBatchNorm to evaluate in session.
PiperOrigin-RevId: 303843669
1 parent 56d9a6e commit ce86b4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

morph_net/tools/configurable_ops_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,9 @@ def testBatchNorm(self):
419419
decorator_zero_output = decorator.batch_norm(ops.VANISHED, **kwargs)
420420
tf_output = layers.batch_norm(self.inputs, **kwargs)
421421

422-
self.assertAllEqual(decorator_regular_output, tf_output)
422+
with self.cached_session():
423+
tf.global_variables_initializer().run()
424+
self.assertAllEqual(decorator_regular_output, tf_output)
423425
self.assertTrue(ops.is_vanished(decorator_zero_output))
424426

425427

0 commit comments

Comments
 (0)