MCPcopy Create free account
hub / github.com/pytorch/tutorials / __len__

Method __len__

beginner_source/basics/data_tutorial.py:132–133  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

130 self.target_transform = target_transform
131
132 def __len__(self):
133 return len(self.img_labels)
134
135 def __getitem__(self, idx):
136 img_path = os.path.join(self.img_dir, self.img_labels.iloc[idx, 0])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected