Comments (3)
The datasets in Torchmeta are responsible for creating the episodes, so there is currently no way to create a non-episodic version of the dataset (as in iterating over the images without creating episodes). That's why it doesn't behave well with the standard PyTorch DataLoader
class out of the box. However the data is there, so there should be a way to add a wrapper around the dataset to convert it to a non-episodic dataset. I will give that a try, thanks for the suggestion!
from pytorch-meta.
The datasets in Torchmeta are responsible for creating the episodes, so there is currently no way to create a non-episodic version of the dataset (as in iterating over the images without creating episodes). That's why it doesn't behave well with the standard PyTorch
DataLoader
class out of the box. However the data is there, so there should be a way to add a wrapper around the dataset to convert it to a non-episodic dataset. I will give that a try, thanks for the suggestion!
If I wrapped the meta-set with a normal pytorch dataloader do what I want?
from pytorch-meta.
Not exactly, because the standard PyTorch DataLoader
uses certain defaults which is not quite compatible with PyTorch datasets. See #76 (comment).
On master, you can now use the NonEpisodicWrapper
to wrap a Torchmeta dataset into something which will be compatible with the defaults in DataLoader
. For example
from torchmeta.datasets.helpers import miniimagenet
from torchmeta.utils.data import NonEpisodicWrapper
from torch.utils.data import DataLoader
dataset = miniimagenet('data', ways=5, shots=5, meta_train=True, download=True)
dataset = NonEpisodicWrapper(dataset)
dataloader = DataLoader(dataset, batch_size=16, shuffle=True, num_workers=4)
for inputs, targets in dataloader:
print(f'inputs.shape = {inputs.shape}') # inputs.shape = torch.Size([16, 3, 84, 84])
targets, class_augmentations = targets
print(f'targets = {targets}') # targets = ('n03400231', 'n04258138', 'n03888605', 'n04389033', 'n03400231', 'n04243546', 'n02823428', 'n02105505', 'n03908618', 'n02747177', 'n02101006', 'n01770081', 'n03476684', 'n02687172', 'n02966193', 'n04435653')
print(f'class_augmentations = {class_augmentations}') # class_augmentations = tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
break
from pytorch-meta.
Related Issues (20)
- Addition of validation per batch HOT 1
- Bug with dataparallel in Pytorch 1.7 + cu110
- Is not normalizing in the helper functions a problem?
- Can the code count the number of segmented targets?
- How to augment support set with torchmeta?
- How to retain the original labels of test/train targets? HOT 2
- meta-dataset support pytorch?
- Is it possible to create my own torchmeta data set using my own classification data set pytorch obj?
- Missing check_integrity import from torchvision.datasets.utils HOT 1
- Torchmeta downgrades the Torch and the Torchvision versions HOT 1
- compatability with next pytorch 1.12.1? HOT 3
- Download miniimagenet error HOT 2
- Is meta data set's fo proto maml available? HOT 1
- when i run the train.py ,there is a errer that cannot find the ordered-set
- how to download a pytorch version that is compatible with thorchmeta 1.8.0 HOT 3
- Torch meta can't import in colab HOT 1
- ERROR: ResolutionImpossible HOT 4
- Columns and DataType Not Explicitly Set on line 372 of tcga.py
- version problem HOT 1
- dataset links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-meta.