MCPcopy Create free account
hub / github.com/CompVis/diff2flow / __getitem__

Method __getitem__

diff2flow/dataloader.py:277–281  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

275 return int(self.num_samples)
276
277 def __getitem__(self, idx):
278 return {
279 k: v if isinstance(v, str) else torch.randn(v)
280 for k, v in self.kwargs.items()
281 }
282
283
284if __name__ == "__main__":

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected