MCPcopy Create free account
hub / github.com/geekcomputers/Python / __len__

Method __len__

ML/src/python/neuralforge/data/dataset.py:79–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 self.channels = channels
78
79 def __len__(self) -> int:
80 return self.num_samples
81
82 def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
83 image = torch.randn(self.channels, self.image_size, self.image_size)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected