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

Method __init__

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

Source from the content-addressed store, hash-verified

255
256class OxfordPetsDataset:
257 def __init__(self, root='./data', split='trainval', transform=None, download=True):
258 if transform is None:
259 transform = transforms.Compose([
260 transforms.Resize(256),
261 transforms.CenterCrop(224),
262 transforms.ToTensor(),
263 transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
264 ])
265
266 self.dataset = datasets.OxfordIIITPet(root=root, split=split, transform=transform, download=download)
267
268 def __len__(self):
269 return len(self.dataset)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected