MCPcopy Index your code
hub / github.com/pytorch/pytorch / test_loops

Method test_loops

caffe2/python/net_builder_test.py:157–165  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

155 self.assertEqual(2, result.fetch())
156
157 def test_loops(self):
158 with Task() as task:
159 out_actual = self._actual_loop()
160 with LocalSession() as session:
161 session.run(task)
162 expected = self._expected_loop()
163 actual = [o.fetch() for o in out_actual]
164 for e, a in zip(expected, actual):
165 self.assertEqual(e, a)
166
167 def test_setup(self):
168 with Task() as task:

Callers

nothing calls this directly

Calls 7

_actual_loopMethod · 0.95
_expected_loopMethod · 0.95
TaskClass · 0.90
LocalSessionClass · 0.90
runMethod · 0.45
fetchMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected