You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's take Cifar10 as an example. I have several questions:
Why are all datasets constructed as iter rather than map style? When I have an index (e.g., 2331), I can no longer use dataset[2331] like the old CIFAR10.
In this case, how to get_item for the new format dataset? Do I have to use IterToMapConverter? That'll be quite strange because raw data format is map, I make it iter and traverse to change back to map.
It's used in all prototype datasets. It seems to wrap datapipe with a shuffler but set_shuffle(False). That seems doing nothing?
When to use Decompressor and set resource.preprocess='decompress' or 'extract'?
What's the difference among Decompressor, resource.preprocess='decompress', resource.preprocess='extract' and using nothing?
Cifar10 resource is a cifar-10-python.tar.gz and sets nothing. It will default call _guess_archive_loader in OnlineResource.load to generate a TarArchiveLoader
MNIST resource is a train-images-idx3-ubyte.gz and uses a Decompressor
cub200 resource is a CUB_200_2011.tgz uses decompress=True
How to use Transform in the new dataset API? such as AutoAugment or RandomCrop? Especially about ToTensor or transforms.PILToTensor(), transforms.ConvertImageDtype(torch.float) (since prototype dataset returns uint8 Tensor). From the Transform V2 Tutorial Page, I may assume that transform is no longer embedded in Dataset because it doesn't accept transform or target_transform args? Then how can I fetch augmented data from the DataLoader?
For dataset that each image is stored in encoded image format (the old ImageFolder type. e.g., ImageNet, GTSRB),the output image format is EncodedImage -> EncodedData -> Datapoint. For dataset stored in binary (e.g., MNIST and CIFAR), the output image format is Image -> Datapoint. Why are they different? I see most transform V2 APIs are conducted on Image. Why is EncodedImage used here?
The text was updated successfully, but these errors were encountered:
I'll try to provide very brief answers to your questions below
It's never been clear to me why map-style datapipes even exist
the shuffleing hints makes sure shuffling happens where it needs to happens if users set shuffle=True in the dataloader. It's pretty awful. But shuffling absolutely needs to happen before sharding (Notes on shuffling, sharding, and batchsize data#302) and this is the only way we found to prevent users shooting themselves in the foot.
Honestly, IDK. I don't recommend relying on this
How to use Transform in the new dataset API? Don't - we're not gonna release those datasets anytime soon
Why is EncodedImage used here? Not sure honestly, probably relics of past designs that we haven't updated
Hi all, I'm currently exploring builtin datasets with new standards:
https://github.com/pytorch/vision/blob/main/torchvision/prototype/datasets
Let's take Cifar10 as an example. I have several questions:
iter
rather thanmap
style? When I have an index (e.g.,2331
), I can no longer usedataset[2331]
like the oldCIFAR10
.In this case, how to
get_item
for the new format dataset? Do I have to useIterToMapConverter
? That'll be quite strange because raw data format ismap
, I make ititer
and traverse to change back tomap
.hint_shuffling
do?shuffler
butset_shuffle(False)
. That seems doing nothing?Decompressor
and setresource.preprocess='decompress' or 'extract'
?What's the difference among
Decompressor
,resource.preprocess='decompress'
,resource.preprocess='extract'
and using nothing?Cifar10
resource is acifar-10-python.tar.gz
and sets nothing. It will default call_guess_archive_loader
inOnlineResource.load
to generate aTarArchiveLoader
MNIST
resource is atrain-images-idx3-ubyte.gz
and uses aDecompressor
cub200
resource is aCUB_200_2011.tgz
usesdecompress=True
AutoAugment
orRandomCrop
? Especially aboutToTensor
ortransforms.PILToTensor(), transforms.ConvertImageDtype(torch.float)
(since prototype dataset returns uint8 Tensor). From the Transform V2 Tutorial Page, I may assume that transform is no longer embedded in Dataset because it doesn't accepttransform
ortarget_transform
args? Then how can I fetch augmented data from the DataLoader?ImageFolder
type. e.g., ImageNet, GTSRB),the output image format isEncodedImage -> EncodedData -> Datapoint
. For dataset stored in binary (e.g., MNIST and CIFAR), the output image format isImage -> Datapoint
. Why are they different? I see most transform V2 APIs are conducted onImage
. Why isEncodedImage
used here?The text was updated successfully, but these errors were encountered: