TorchFold
Blog post: http://near.ai/articles/2017-09-06-PyTorch-Dynamic-Batching/
Analogous to TensorFlow Fold, implements dynamic batching with super simple interface.
Replace every direct call in your computation to nn module with f.add('function name', arguments).
It will construct an optimized version of computation and on f.apply will dynamically batch and execute the computation on given nn module.
Installation
We recommend using pip package manager:
pip install torchfold
Example
f = torchfold.Fold()
def dfs(node):
if is_leaf(node):
return f.add('leaf', node)
else:
prev = f.add('init')
for child in children(node):
prev = f.add('child', prev, child)
return prev
class Model(nn.Module):
def __init__(self, ...):
...
def leaf(self, leaf):
...
def child(self, prev, child):
...
res = dfs(my_tree)
model = Model(...)
f.apply(model, [[res]])
Metadata
Release files for torchfold 0.1.0
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 |
|---|---|---|---|---|
| torchfold-0.1.0.tar.gz | 4.7 kB | Without provenance | Details for torchfold-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torchfold-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for torchfold-0.1.0-py3-none-any.whl |
Total release size: 10.1 kB
Release files / torchfold-0.1.0.tar.gz
| Download URL | torchfold-0.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73605bdbbaa627735bb28c3f90d654896de248fa1a988e730182b68ddf4660a6
|
|
BLAKE2b-256 checksum How to use checksums |
12804c88fea850af25cb66e5d07eff3b38411eaa09f94c5a3c4370a7316a9234
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / torchfold-0.1.0-py3-none-any.whl
| Download URL | torchfold-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53721bbf32b61119f596b23d44061503497d5eb6fa67a3c1c82ba008842b3c26
|
|
BLAKE2b-256 checksum How to use checksums |
c0fb2ff01af27b6fbe147a16be0e3f78007a3d03224d89ebcfa2441d838398bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for torchfold 0.1.0
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.