Generate torch models from yaml config files.
Reason this release was yanked:
unmaintained
Project description
yaml-models
Python package generating torch models from a yaml configuration file.
Each type item in model list need to specify at minimum the default values
needed by the torch.nn module. Arguments not specified will use the default
values.
Example config:
model:
- type: Linear
in_features: 2
out_features: 10
- type: ReLU
- type: Linear
in_features: 10
out_features: 1
- type: Sigmoid
torch.nn.Linear needs the default arguments in_features and out_features.
Usage
pip install yaml-models
>>> from yaml_models.model import Model
>>> model = Model(config_path="./example_config/model.yaml")
>>> print(model)
Model(
(layers): ModuleList(
(0): Linear(in_features=2, out_features=10, bias=True)
(1): ReLU()
(2): Linear(in_features=10, out_features=1, bias=True)
(3): Sigmoid()
)
)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaml_models-0.1.0.tar.gz.
File metadata
- Download URL: yaml_models-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cab68144f892ea7bb1c4068b25937d99deb7163031d3640d02325a3e8fe16dff
|
|
| MD5 |
0b94b016bd822a889bf9c3f000c7f9c5
|
|
| BLAKE2b-256 |
9b6369898d5517c03fe85edef7779978da07caeb00c60b4bb71e4a41d0cf4291
|
File details
Details for the file yaml_models-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: yaml_models-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5767939346012d98d47611d08f7fbd934575718cc720cc5b3ac3246b83dcac7
|
|
| MD5 |
572ec663a7112d657d424ddb066f86c1
|
|
| BLAKE2b-256 |
f6728a6109ca829445871f26ee7da9a5dbca6d057902c7e9988eb85d1679c333
|