Skip to content

Commit

Permalink
Merge pull request #3 from kengz/expose
Browse files Browse the repository at this point in the history
expose to_namedtuple
  • Loading branch information
kengz authored Jun 15, 2020
2 parents 898b216 + 014d4b6 commit 895a42e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ batch_size = 16
dag_in_shape = arc['dag_in_shape']
data = {'image': torch.rand([batch_size, *dag_in_shape['image']]), 'vector': torch.rand([batch_size, *dag_in_shape['vector']])}
# convert from a dict of Tensors into a TensorTuple - a namedtuple
xs = torcharc.net_util.to_namedtuple(data)
xs = torcharc.to_namedtuple(data)
# returns TensorTuple if output is multi-model, Tensor otherwise
ys = model(xs)
```
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run_tests(self):

setup(
name='torcharc',
version='0.0.3',
version='0.0.4',
description='Build PyTorch networks by specifying architectures.',
long_description='https://github.com/kengz/torcharc',
keywords='torcharc',
Expand Down
1 change: 1 addition & 0 deletions torcharc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from torcharc import module_builder
from torcharc.net_util import to_namedtuple
from torcharc.module import dag
from torch import nn

Expand Down

0 comments on commit 895a42e

Please sign in to comment.