(self)
| 795 | class HingeTest(test.TestCase): |
| 796 | |
| 797 | def test_config(self): |
| 798 | hinge_obj = metrics.Hinge(name='hinge', dtype=dtypes.int32) |
| 799 | self.assertEqual(hinge_obj.name, 'hinge') |
| 800 | self.assertEqual(hinge_obj._dtype, dtypes.int32) |
| 801 | |
| 802 | # Check save and restore config |
| 803 | hinge_obj2 = metrics.Hinge.from_config(hinge_obj.get_config()) |
| 804 | self.assertEqual(hinge_obj2.name, 'hinge') |
| 805 | self.assertEqual(hinge_obj2._dtype, dtypes.int32) |
| 806 | |
| 807 | def test_unweighted(self): |
| 808 | hinge_obj = metrics.Hinge() |
nothing calls this directly
no test coverage detected