(self)
| 298 | |
| 299 | @test_util.run_in_graph_and_eager_modes |
| 300 | def testAcceptsRefs(self): |
| 301 | if context.executing_eagerly(): |
| 302 | var = resource_variable_ops.ResourceVariable(10, name="var") |
| 303 | else: |
| 304 | var = variables.Variable(10) |
| 305 | result = math_ops.scalar_mul(3, var) |
| 306 | init = variables.global_variables_initializer() |
| 307 | with test_util.device(use_gpu=True): |
| 308 | self.evaluate(init) |
| 309 | self.assertEqual(30, self.evaluate(result)) |
| 310 | |
| 311 | @test_util.run_in_graph_and_eager_modes |
| 312 | def testAcceptsConstant(self): |
nothing calls this directly
no test coverage detected