(self)
| 681 | attrs=('message', 1, 'T', dtypes.float32.as_datatype_enum)) |
| 682 | |
| 683 | def testExecuteFloatAttr(self): |
| 684 | almost_equal = execute( |
| 685 | b'ApproximateEqual', |
| 686 | num_outputs=1, |
| 687 | inputs=[constant_op.constant(3.0), constant_op.constant(2.9)], |
| 688 | attrs=('tolerance', 0.3, 'T', dtypes.float32.as_datatype_enum))[0] |
| 689 | self.assertTrue(almost_equal) |
| 690 | |
| 691 | def testExecuteFloatAttrBadValue(self): |
| 692 | with self.assertRaises(errors.InvalidArgumentError): |