MCPcopy
hub / github.com/facebookresearch/detectron2 / _data_loader

Method _data_loader

tests/test_engine.py:40–43  ·  view source on GitHub ↗
(self, device)

Source from the content-addressed store, hash-verified

38
39class TestTrainer(unittest.TestCase):
40 def _data_loader(self, device):
41 device = torch.device(device)
42 while True:
43 yield torch.rand(3, 3).to(device)
44
45 def test_simple_trainer(self, device="cpu"):
46 model = _SimpleModel().to(device=device)

Callers 5

test_simple_trainerMethod · 0.95
test_writer_hooksMethod · 0.95
test_eval_hookMethod · 0.95

Calls 2

deviceMethod · 0.45
toMethod · 0.45

Tested by

no test coverage detected