Root package info.
Project description
Eqxvision
Eqxvision is a package of popular computer vision model architectures built using Equinox.
Installation
Use the package manager pip to install eqxvision.
pip install eqxvision
requires: python>=3.7
Usage
import jax
import jax.random as jr
import equinox as eqx
from eqxvision.models import alexnet
@eqx.filter_jit
def forward(net, images, key):
keys = jax.random.split(key, images.shape[0])
output = jax.vmap(net, axis_name=('batch'))(images, key=keys)
...
net = alexnet(num_classes=1000)
images = jr.uniform(jr.PRNGKey(0), shape=(1,3,224,224))
output = forward(net, images, jr.PRNGKey(0))
import equinox as eqx
from eqxvision.models import alexnet
net = alexnet(num_classes=1000)
net = eqx.tree_inference(net, True)
Tips
- Checkout the documentation for a sample usage for each model;
- Better to use
@equinox.jit_filter
instead of@jax.jit
; - Advisable to use
jax.vmap
withaxis_name='batch'
for all models; - Don't forget to switch to
inference
mode for evaluations.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Acknowledgements
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eqxvision-0.0.5.tar.gz
(14.5 kB
view hashes)
Built Distribution
eqxvision-0.0.5-py3-none-any.whl
(20.9 kB
view hashes)
Close
Hashes for eqxvision-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c144149381bfe3f65431b4974889968279717437e39c5166fd62f648331654 |
|
MD5 | f25e4a86239d757f8c6007774e431fa7 |
|
BLAKE2b-256 | ee8143a3c8bc26a800c5bf3f6f4a9e17697c27dfcc5a22ad8e2dc746c722649d |