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

how to use lstm with torchmeta, pls? #141

Open
AndrewHYC opened this issue Sep 20, 2021 · 2 comments
Open

how to use lstm with torchmeta, pls? #141

AndrewHYC opened this issue Sep 20, 2021 · 2 comments

Comments

@AndrewHYC
Copy link

No description provided.

@brando90
Copy link

what issues are you having? torche meta is just a dataloader library, it should be easy (but tedious) to do it since there is nothing that stops torchmeta from working. The model is usually a seperate thing...

@tristandeleu
Copy link
Owner

I assume that you would like to use an LSTM as a MetaModule, in order to be able to backpropagate through an update (like in MAML)?

Unfortunately at the moment, there is no LSTM MetaModule; however, you could create one by taking the nn.LSTM module in PyTorch, and converting it to a functional module. See the comparison between nn.Linear and MetaLinear for inspiration.

Another option, that would work out of the box with any PyTorch module is to use higher. You can check out this example on how to use Torchmeta and higher together.

Hope this helps!

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

3 participants