learn2learn
learn2learn copied to clipboard
Return pytorch tensor for mini-imagenet labels?
https://github.com/learnables/learn2learn/blob/06893e847693a0227d5f35a6e065e6161bb08201/learn2learn/vision/datasets/mini_imagenet.py#L111
Currently, when loading mini-imagenet the inputs are returned as pytorch tensors while the labels as numpy arrays. Since the user will likely use both in a training loop, does it make sense to cast the labels for long pytorch tensors?
Thanks for spotting this and the docstring (#258) issue in mini-ImageNet @pietrolesci. Yes, both should be tensors.
In fact, let me piggy-back and mention one more issue: in the benchmarks, mini-ImageNet and tiered-ImageNet return samples with different input ranges, with data_augmentation=None
. (Tiered is 0-1 but mini is 0-255.) Ideally, all vision benchmarks would have the same ranges and types by default, probably 0-255 uint8 for images.
Hi @seba-1511, thanks for picking this up and for your answer :)