MCPcopy Create free account
hub / github.com/NVlabs/SegFormer / __getitem__

Method __getitem__

tests/test_eval_hook.py:18–20  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

16class ExampleDataset(Dataset):
17
18 def __getitem__(self, idx):
19 results = dict(img=torch.tensor([1]), img_metas=dict())
20 return results
21
22 def __len__(self):
23 return 1

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected