Code Monkey home page Code Monkey logo

dwsnets's Introduction

DWSNets

Official implementation for Equivariant Architectures for Learning in Deep Weight Spaces by Aviv Navon, Aviv Shamsian, Idan Achituve, Ethan Fetaya, Gal Chechik, Haggai Maron.

Our implementation follows the block structure as described in the paper.

Setup environment

To run the experiments, first create clean virtual environment and install the requirements.

conda create -n dwsnets python=3.9
conda activate dwsnets
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

Install the repo:

git clone https://github.com/AvivNavon/DWSNets.git
cd DWSNets
pip install -e .

Introduction Notebook

An introduction notebook for INR classification with DWSNets: Open In Colab

Run experiment

To run specific experiment, please follow the instructions in the README file within each experiment folder. It provides full instructions and details for downloading the data and reproducing the results reported in the paper.

Dataset

The datasets are available here.

Citation

If you find our work or this code to be useful in your own research, please consider citing the following paper:

@InProceedings{pmlr-v202-navon23a,
  title = 	 {Equivariant Architectures for Learning in Deep Weight Spaces},
  author =       {Navon, Aviv and Shamsian, Aviv and Achituve, Idan and Fetaya, Ethan and Chechik, Gal and Maron, Haggai},
  booktitle = 	 {Proceedings of the 40th International Conference on Machine Learning},
  pages = 	 {25790--25816},
  year = 	 {2023},
  editor = 	 {Krause, Andreas and Brunskill, Emma and Cho, Kyunghyun and Engelhardt, Barbara and Sabato, Sivan and Scarlett, Jonathan},
  volume = 	 {202},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {23--29 Jul},
  publisher =    {PMLR},
  pdf = 	 {https://proceedings.mlr.press/v202/navon23a/navon23a.pdf},
  url = 	 {https://proceedings.mlr.press/v202/navon23a.html},
}

dwsnets's People

Contributors

avivnavon avatar avivsham avatar haggaim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dwsnets's Issues

Are the weights of MNIST INRs modified?

Hi!

I 'm trying to display the MNIST images encoded into the MNIST INRs you uploaded to DropBox.
I'm using the following code:

state_dict = torch.load(os.path.join(path, dir_, 'checkpoints', 'model_final.pth'), map_location=device)
w0, b0 = state_dict['seq.0.weight'], state_dict['seq.0.bias']
w1, b1 = state_dict['seq.1.weight'], state_dict['seq.1.bias']
w2, b2 = state_dict['seq.2.weight'], state_dict['seq.2.bias']
x = get_mgrid(28, dim=2).to(device)
x = torch.mm(x, w0.T) + b0
x = torch.sin(x)
x = torch.mm(x, w1.T) + b1
x = torch.sin(x)
x = torch.mm(x, w2.T) + b2
x = x.reshape(28, 28).cpu().numpy()

How should I modify this code to get back the images?

Thank you
Daniel

May I ask for the INRs of CIFAR-10 please

Hallo dear author! Great job!
Could you please share the INRs of CIFAR-10 ?
The computational burden is too heavy for some researches with limited resources like us.
Thank you very much!

Access to the dataset of INRs with same amplitude?

Hi, very interesting work, thanks!
I'm interested in using the dataset used for the Figure 3 experiment in the paper (sine wave regression with constant amplitude and only frequency changing). Is it possible to access it somehow?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.