Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to retrieve input images after sampling a task #419

Open
farida-bint opened this issue Oct 24, 2023 · 3 comments
Open

unable to retrieve input images after sampling a task #419

farida-bint opened this issue Oct 24, 2023 · 3 comments

Comments

@farida-bint
Copy link

Hi,

I tested MAML and Reptile algorithms using mini-imagenet dataset, and the data are sampled using a TasksetDataset,

Question: Is it normal that after the set of tasks are created, the inputs images (the originals) are no longer there?
For each batch in the training loop, I tried to plot the samples (images) but I got blank images presenting few points in it.

I wanted to visualize the results (predictions) of each algorithm in a form of : (input image, prediction, label) but got no image.

l2l-pred

@ImahnShekhzadeh
Copy link

ImahnShekhzadeh commented Nov 20, 2023

[...] and the data are sampled using a TasksetDataset

First of all note that there are only the classes Taskset and TaskDataset, with the latter being deprecated in favor of the first.

Question: Is it normal that after the set of tasks are created, the inputs images (the originals) are no longer there?

Not really, no. I just tested it in the script anil_fc100.py.

Maybe you can share your code?

@farida-bint
Copy link
Author

Thanks a lot for your reply,

I already used the Taskset option and it didn't change the results. Below is a screenshot of a Colab file I used to check the input images after sampling some tasks from mini-imagenet train data.

Before sampling the tasks, the input images are all ok

before-sampling

After sampling, the images seem unavailable or maybe transformed

code-for-sampling
result-after-sampling

@ImahnShekhzadeh
Copy link

In general, it is much easier to read code when it is properly formatted in the text msg, take a look here: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks 🙂

You might be using a wrong order for defining the MetaDataset and the Taskset, take a look here: https://github.com/learnables/learn2learn/blob/master/examples/vision/anil_fc100.py#L80-L91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants