BayesWatch / deep-kernel-transfer

Official pytorch implementation of the paper "Bayesian Meta-Learning for the Few-Shot Setting via Deep Kernels" (NeurIPS 2020)
https://arxiv.org/abs/1910.05199
200 stars 29 forks source link

Could someone share the typical architecture with DKT of this model. #20

Closed Shantan243 closed 1 year ago

mpatacchiola commented 1 year ago

Hi @Shantan243 .

You can find the implementation for DKT (regression) in the repository at this address. The code for the DKT classification is available here instead. Give a look at the DKT class in both file, it is pretty simple to define a DKT model. Note that, there is also an associated train and test look under the same class.

For DKT regression, the only object you need to provide is the backbone (as you can see at this line). The backbone can be your own (e.g. ResNet) or one of the backbones that you can find here in our repo. We have used a Conv4 in our experiments.

Moreover, if you are using DKT for regression I suggest to give a look at the code for the sine-waves experiments that you can find here. This code is self-contained, and you can see how to create a DKT model from scratch by using the ExactGP model from GPytorch.