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

Method __init__

ML/src/python/neuralforge/data/datasets.py:239–248  ·  view source on GitHub ↗
(self, root='./data', transform=None, download=True)

Source from the content-addressed store, hash-verified

237
238class Caltech256Dataset:
239 def __init__(self, root='./data', transform=None, download=True):
240 if transform is None:
241 transform = transforms.Compose([
242 transforms.Resize(256),
243 transforms.CenterCrop(224),
244 transforms.ToTensor(),
245 transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
246 ])
247
248 self.dataset = datasets.Caltech256(root=root, transform=transform, download=download)
249
250 def __len__(self):
251 return len(self.dataset)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected