>>> import torchvision.transforms as transforms
>>> train_set = TaskVisionDataset(client, TRAIN_TASK_ID,
transform=transforms.ToTensor(),
target_transform=ExtractSingleLabelIndex())
INFO - Fetching task 77708...
INFO - Loaded data metadata from cache
INFO - Downloading chunks...
INFO - All chunks downloaded
INFO - Loaded annotations from cache
>>> train_set[0]
(tensor([[[0.5294, 0.5412, 0.5569, ..., 0.6000, 0.6118, 0.5804],
[0.5255, 0.5373, 0.5529, ..., 0.6000, 0.6118, 0.5804],
[0.5216, 0.5333, 0.5529, ..., 0.6000, 0.6078, 0.5725],
[...snipped...]
[0.1020, 0.1020, 0.1020, ..., 0.4980, 0.4980, 0.4980]]]), tensor(2))
Comments