YannDubs / Neural-Process-Family

Code for the Neural Processes website and replication of 4 papers on NPs. Pytorch implementation.
https://yanndubs.github.io/Neural-Process-Family/
MIT License
202 stars 45 forks source link

[Question] ConvCNP in more than 1 spatial dimension #9

Closed alexmaraval closed 1 year ago

alexmaraval commented 1 year ago

Thanks for the amazing repo and its related website, I'm enjoying learning about the NPF :)

This issue is more of a general question rather than a specific problem.

I am wondering if it is possible to use the ConvCNP model for regression with inputs x of dimension larger than 1. I notice that the SetConv layer produces an error if we initialize it with x_dim larger than 1.

Also from the paper it should be possible to replicate the experiment on the PLAsTiCC dataset but as far as I understand this experiment is set up as a multi-input-multi-output, i.e. you'd have a 6d input and 6d output.

Is there a way to have for example a 6d input but only a 1d output using this repo? And is there a way to do that off-grid?

YannDubs commented 1 year ago

If you remove the assertion here and use RadialBasisFunc=MlpRBF (or implement ExpRBF for multidimensional x_dim) it should work although I never tested it.

You might also want to look at: https://github.com/cambridge-mlg/convcnp (original repo for off-the0grid results in that paper ) and https://github.com/wesselb/neuralprocesses