(self)
| 1534 | self.assertEqual((1,), loss.field_types()[0].shape) |
| 1535 | |
| 1536 | def testPropagateRequestOnly(self): |
| 1537 | # test case when output is request only |
| 1538 | input_record = self.new_record(schema.Struct( |
| 1539 | ('input1', schema.Scalar((np.float32, (32, )))), |
| 1540 | ('input2', schema.Scalar((np.float32, (64, )))), |
| 1541 | ('input3', schema.Scalar((np.float32, (16, )))), |
| 1542 | )) |
| 1543 | |
| 1544 | set_request_only(input_record) |
| 1545 | concat_output = self.model.Concat(input_record) |
| 1546 | self.assertEqual(is_request_only_scalar(concat_output), True) |
| 1547 | |
| 1548 | # test case when output is not request only |
| 1549 | input_record2 = self.new_record(schema.Struct( |
| 1550 | ('input4', schema.Scalar((np.float32, (100, )))) |
| 1551 | )) + input_record |
| 1552 | |
| 1553 | concat_output2 = self.model.Concat(input_record2) |
| 1554 | self.assertEqual(is_request_only_scalar(concat_output2), False) |
| 1555 | |
| 1556 | def testSetRequestOnly(self): |
| 1557 | input_record = schema.Scalar(np.int64) |
nothing calls this directly
no test coverage detected