nnoir-chainer
Chainer Model from/to NNOIR converter
ATTENTION: This library goes into the maintenance phase too.
Install
pip install nnoir-chainer
Example
Import NNOIR
import chainer
from nnoir_chainer import NNOIRFunction
m = NNOIRFunction('nnoir_file_path')
x = chainer.Variable(np_array)
with chainer.using_config('train', False):
y = m(x)
print(y)
Export NNOIR
m = model.CNN()
chainer.serializers.load_npz('cnn.model', L.Classifier(m))
with chainer.using_config('train', False):
x = chainer.Variable(np.zeros((1, 28*28)).astype(np.float32))
y = m(x)
g = nnoir_chainer.Graph(m, (x,), (y,))
result = g.to_nnoir()
with open('model.nnoir', 'w') as f:
f.buffer.write(result)
These layers are supported by nnoir-chainer exporter.
- chainer.links
- BatchNormalization
- Bias
- Linear
- Convolution2D (DepthwiseConvolution2D, DilatedConvolution2D)
- Scale
- Swish
- chainer.function
- Add
- AddConstant
- AveragePooling2D
- ClippedReLU
- Concat
- Dropout
- ELU
- LeakyReLU
- MaxPooling2D
- Mul
- MulConstant
- Pad
- ReLU
- Reshape
- Sigmoid
- Softmax
- Sub
- Sum
- Tanh
- Transpose
- Unpooling2D
Metadata
Release files for nnoir-chainer 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nnoir-chainer-1.1.3.tar.gz | 17.2 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nnoir_chainer-1.1.3-py3.7.egg | Legacy Egg format | - | - | Details |
| nnoir_chainer-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 219.3 kB
Release files / nnoir-chainer-1.1.3.tar.gz
| Download URL | nnoir-chainer-1.1.3.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d62b7ddf022f1b9e585c423de9bb2654cbeb4a77b6ec1bea9672a02fba8301b
|
|
BLAKE2b-256 checksum How to use checksums |
ccfad381efb2f77e95f75cf6e976e7503c1a9067fc0cebc9dc9fe4c7ab0313cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|
Release files / nnoir_chainer-1.1.3-py3.7.egg
| Download URL | nnoir_chainer-1.1.3-py3.7.egg |
|---|---|
| Size | 145.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
fa8a9dd0cf1741326e7c1b2d7f76b76ca6c4fdc960d904ad98a71460ba346425
|
|
BLAKE2b-256 checksum How to use checksums |
bc0710afb609e92340790629453cf4652a9e59aec4a1f60db3b12081cabb53d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|
Release files / nnoir_chainer-1.1.3-py3-none-any.whl
| Download URL | nnoir_chainer-1.1.3-py3-none-any.whl |
|---|---|
| Size | 57.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8191471dc6fc8af0a9edd9789dc85e98e857d49743d4fd695b7f5dd11fab39f2
|
|
BLAKE2b-256 checksum How to use checksums |
2dc80ba3bd361bc45e832c21d0ed8b03b2bce8cff1bcc28d96ced1ded35dd655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|