(self, net, value, forward_only)
| 141 | self.assertEqual(run_cnt[1] - run_cnt[0], run_cnt[2] - run_cnt[1]) |
| 142 | |
| 143 | def enable_rnn_executor(self, net, value, forward_only): |
| 144 | num_found = 0 |
| 145 | for op in net.Proto().op: |
| 146 | if op.type.startswith("RecurrentNetwork"): |
| 147 | for arg in op.arg: |
| 148 | if arg.name == 'enable_rnn_executor': |
| 149 | arg.i = value |
| 150 | num_found += 1 |
| 151 | # This sanity check is so that if someone changes the |
| 152 | # enable_rnn_executor parameter name, the test will |
| 153 | # start failing as this function will become defective. |
| 154 | self.assertEqual(1 if forward_only else 2, num_found) |
no test coverage detected