![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Unofficial PyTorch implementation of Gradient Origin Networks.
Reconstructions | Samples |
---|---|
![]() | ![]() |
![]() | ![]() |
Requirements:
After cloning the repository, a GON can be trained using the train_gon.py
script:
python train_gon.py dataset.name=<MNIST|FashionMNIST|CIFAR10> dataset.root=<data-root>
All configuration options are listed in config/config.yaml
. See the hydra documentation for more information on configuration.
Install the package:
pip install gon-pytorch
Instantiate a GON with NeRF positional encodings:
import torch
from gon_pytorch import NeRFPositionalEncoding, ImplicitDecoder, GON, SirenBlockFactory
pos_encoder = NeRFPositionalEncoding(in_dim=2)
decoder = ImplicitDecoder(
latent_dim=128,
out_dim=3,
hidden_dim=128,
num_layers=4,
block_factory=SirenBlockFactory(),
pos_encoder=pos_encoder
)
gon = GON(decoder)
coords = torch.randn(1, 32, 32, 2)
image = torch.rand(1, 32, 32, 3)
# Obtain latent
latent, latent_loss = gon.infer_latents(coords, image)
# Reconstruct from latent
recon = gon(coords, latent)
# Optimize model
loss = ((recon - image) ** 2).mean()
loss.backward()
@misc{bondtaylor2021gradient,
title={Gradient Origin Networks},
author={Sam Bond-Taylor and Chris G. Willcocks},
year={2021},
eprint={2007.02798},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{sitzmann2020implicit,
title={Implicit Neural Representations with Periodic Activation Functions},
author={Vincent Sitzmann and Julien N. P. Martel and Alexander W. Bergman and David B. Lindell and Gordon Wetzstein},
year={2020},
eprint={2006.09661},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{mildenhall2020nerf,
title={NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis},
author={Ben Mildenhall and Pratul P. Srinivasan and Matthew Tancik and Jonathan T. Barron and Ravi Ramamoorthi and Ren Ng},
year={2020},
eprint={2003.08934},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{mehta2021modulated,
title = {Modulated Periodic Activations for Generalizable Local Functional Representations},
author = {Ishit Mehta and Michaël Gharbi and Connelly Barnes and Eli Shechtman and Ravi Ramamoorthi and Manmohan Chandraker},
year = {2021},
eprint = {2104.03960},
archivePrefix = {arXiv},
primaryClass = {cs.CV}
}
FAQs
Implementation of Gradient Origin Networks in PyTorch
We found that gon-pytorch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.