Given a net and a list of OpSpec's, check that the net match the spec
(self, net, op_specs)
| 125 | self.assertEqual(parse_args(spec_args), op_args) |
| 126 | |
| 127 | def assertNetContainOps(self, net, op_specs): |
| 128 | """ |
| 129 | Given a net and a list of OpSpec's, check that the net match the spec |
| 130 | """ |
| 131 | ops = net.Proto().op |
| 132 | self.assertEqual(len(op_specs), len(ops)) |
| 133 | for op, op_spec in zip(ops, op_specs): |
| 134 | self.assertEqual(op_spec.type, op.type) |
| 135 | self.assertBlobsEqual(op_spec.input, op.input) |
| 136 | self.assertBlobsEqual(op_spec.output, op.output) |
| 137 | if op_spec.arg is not None: |
| 138 | self.assertArgsEqual(op_spec.arg, op.arg) |
| 139 | return ops |
no test coverage detected