All Projects → chrhenning → hypnettorch

chrhenning / hypnettorch

Licence: Apache-2.0 license
Package for working with hypernetworks in PyTorch.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to hypnettorch

Torchdata
PyTorch dataset extended with map, cache etc. (tensorflow.data like)
Stars: ✭ 226 (+242.42%)
Mutual labels:  torch
graftr
graftr: an interactive shell to view and edit PyTorch checkpoints.
Stars: ✭ 89 (+34.85%)
Mutual labels:  torch
eccv16 attr2img
Torch Implemention of ECCV'16 paper: Attribute2Image
Stars: ✭ 93 (+40.91%)
Mutual labels:  torch
Alphaction
Spatio-Temporal Action Localization System
Stars: ✭ 221 (+234.85%)
Mutual labels:  torch
Artificial Intelligence Deep Learning Machine Learning Tutorials
A comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
Stars: ✭ 2,966 (+4393.94%)
Mutual labels:  torch
ThArrays.jl
A Julia interface for PyTorch's C++ backend, focusing on Tensor, AD, and JIT
Stars: ✭ 23 (-65.15%)
Mutual labels:  torch
Torch
R Interface to Torch
Stars: ✭ 214 (+224.24%)
Mutual labels:  torch
hyperstyle
Official Implementation for "HyperStyle: StyleGAN Inversion with HyperNetworks for Real Image Editing" (CVPR 2022) https://arxiv.org/abs/2111.15666
Stars: ✭ 874 (+1224.24%)
Mutual labels:  hypernetworks
multiclass-semantic-segmentation
Experiments with UNET/FPN models and cityscapes/kitti datasets [Pytorch]
Stars: ✭ 96 (+45.45%)
Mutual labels:  torch
image-background-remove-tool
✂️ Automated high-quality background removal framework for an image using neural networks. ✂️
Stars: ✭ 767 (+1062.12%)
Mutual labels:  torch
Gpt2 Newstitle
Chinese NewsTitle Generation Project by GPT2.带有超级详细注释的中文GPT2新闻标题生成项目。
Stars: ✭ 235 (+256.06%)
Mutual labels:  torch
Pixeldtgan
A torch implementation of "Pixel-Level Domain Transfer"
Stars: ✭ 248 (+275.76%)
Mutual labels:  torch
deepgenres.torch
Predict the genre of a song using the Torch deep learning library
Stars: ✭ 18 (-72.73%)
Mutual labels:  torch
Echotorch
A Python toolkit for Reservoir Computing and Echo State Network experimentation based on pyTorch. EchoTorch is the only Python module available to easily create Deep Reservoir Computing models.
Stars: ✭ 231 (+250%)
Mutual labels:  torch
inpainting FRRN
Progressive Image Inpainting (Kolmogorov Team solution for Huawei Hackathon 2019 summer)
Stars: ✭ 30 (-54.55%)
Mutual labels:  torch
Visdial
[CVPR 2017] Torch code for Visual Dialog
Stars: ✭ 215 (+225.76%)
Mutual labels:  torch
lantern
[Android Library] Handling device flash as torch for Android.
Stars: ✭ 81 (+22.73%)
Mutual labels:  torch
Captcha-Cracking
Crack number and Chinese captcha with both traditional and deep learning methods, based on Torch and python.
Stars: ✭ 35 (-46.97%)
Mutual labels:  torch
C5
Reference code for the paper "Cross-Camera Convolutional Color Constancy" (ICCV 2021)
Stars: ✭ 75 (+13.64%)
Mutual labels:  hypernetworks
yann
Yet Another Neural Network Library 🤔
Stars: ✭ 26 (-60.61%)
Mutual labels:  torch

Hypernetworks for PyTorch

This package contains utilities that make it easy to work with hypernetworks in PyTorch.

Installation

You can either install the latest package version via

python3 -m pip install hypnettorch

or, you directly install the current sources

python3 -m pip install git+https://github.com/chrhenning/hypnettorch

Installation for developers

If you actively develop the package, it is easiest to install it in development mode, such that all changes that are done to source files are directly visible when you use the package.

Clone the repository to a location of your choice

git clone https://github.com/chrhenning/hypnettorch.git

and move inside the cloned repo

cd ./hypnettorch

Now, you can simply install the package in editable mode, which will ensure that you can easily update the package sources (cf. development mode)

pip3 install --editable . --user

Since the package was installed in editable mode, you can always update the sources simply by pulling the most recent code

git pull

You can uninstall the package at any point by running python3 setup.py develop -u.

Usage

The basic functionalities of the package are quite intuitive and easy to use, e.g.,

import torch
from hypnettorch.mnets import MLP
from hypnettorch.hnets import HMLP
mnet = MLP(n_in=8, n_out=1, no_weights=True) # Create MLP with 8 inputs and 1 output.
hnet = HMLP(mnet.param_shapes) # Create hypernetwork for the above MLP.
weights = hnet.forward(cond_id=0) # Generate the weights of network `mnet`.
inputs = torch.rand(32, 8) # Random inputs.
mnet.forward(inputs, weights=weights) # Compute predictions using the generated weights.

There are several tutorials. Check out the getting started tutorial when working with hypnettorch for the first time.

You may also checkout the examples. For instance, how to use hypernetworks for continual learning.

Documentation

The documentation can be found here.

Note for developers

The documentation can be build using

python3 setup.py build_sphinx

and opened via the file index.html.

Citation

When using this package in your research project, please consider citing one of our papers for which this package has been developed.

@inproceedings{posterior:replay:2021:henning:cervera,
title={Posterior Meta-Replay for Continual Learning}, 
      author={Christian Henning and Maria R. Cervera and Francesco D'Angelo and Johannes von Oswald and Regina Traber and Benjamin Ehret and Seijin Kobayashi and Benjamin F. Grewe and João Sacramento},
booktitle={Conference on Neural Information Processing Systems},
year={2021},
url={https://arxiv.org/abs/2103.01133}
}
@inproceedings{ehret2020recurrenthypercl,
  title={Continual Learning in Recurrent Neural Networks},
  author={Benjamin Ehret and Christian Henning and Maria R. Cervera and Alexander Meulemans and Johannes von Oswald and Benjamin F. Grewe},
  booktitle={International Conference on Learning Representations},
  year={2021},
  url={https://arxiv.org/abs/2006.12109}
}
@inproceedings{oshg2019hypercl,
title={Continual learning with hypernetworks},
author={Johannes von Oswald and Christian Henning and Benjamin F. Grewe and Jo{\~a}o Sacramento},
booktitle={International Conference on Learning Representations},
year={2020},
url={https://arxiv.org/abs/1906.00695}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].