This release is a pre-release and may not be stable for production use.
MetaNN for PyTorch Meta Learning
1. Introduction
In meta learner scenario, it is common use dependent variables as parameters, and back propagate the gradient of the parameters. However, parameters of PyTorch Module are designed to be leaf nodes and it is forbidden for parameters to have grad_fn. Meta learning coders are therefore forced to rewrite the basic layers to adapt the meta learning requirements.
This module provide an extension of torch.nn.Module, DependentModule that has dependent parameters, allowing the differentiable dependent parameters. It also provide the method to transform nn.Module into DependentModule, and turning all of the parameters of a nn.Module into dependent parameters.
2. Installation
pip install MetaNN
3. Example
from metann import DependentModule, Learner
from torch import nn
net = torch.nn.Sequential(
nn.Linear(10, 100),
nn.Linear(100, 5))
net = DependentModule(net)
print(net)
4. Documents
This won’t build correctly with the heavy dependency PyTorch, so I updated the sphinx built html to GitHub. I hate to use mock to solve This problem, I suggest you to clone the repository and view the html docs yourself.
5. License
Copyright (c) 2019-present, Hanqiao Yu
Metadata
Release files for MetaNN 0.2.1.dev2020114
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| MetaNN-0.2.1.dev2020114.tar.gz | 7.3 kB | Without provenance | Details for MetaNN-0.2.1.dev2020114.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| MetaNN-0.2.1.dev2020114-py3-none-any.whl | Python 3 | none | any | Details for MetaNN-0.2.1.dev2020114-py3-none-any.whl |
Total release size: 16.3 kB
Release files / MetaNN-0.2.1.dev2020114.tar.gz
| Download URL | MetaNN-0.2.1.dev2020114.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30bc946708613b4aa24f570d8dd7b7a5abcb29043cf1db1fff5b0129327080c1
|
|
BLAKE2b-256 checksum How to use checksums |
36940d51b446712d934a84a799db695a1d78c6e8728b1eb471689fbf432aa780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
|
Release files / MetaNN-0.2.1.dev2020114-py3-none-any.whl
| Download URL | MetaNN-0.2.1.dev2020114-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e067acc1826ca5cb206296e5791f2af57a687a871c92b199207aeacf243e1c69
|
|
BLAKE2b-256 checksum How to use checksums |
191b5e09143d2dd2e8d5c9e32445727dbca9636fb433aea9617e16fc35332289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
|
Security for MetaNN 0.2.1.dev2020114
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.