Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'torch._C.Value' object has no attribute 'uniqueName' #10

Closed
slashdottir opened this issue Oct 13, 2019 · 2 comments
Closed

'torch._C.Value' object has no attribute 'uniqueName' #10

slashdottir opened this issue Oct 13, 2019 · 2 comments

Comments

@slashdottir
Copy link

in
5 Nonlinea regression.ipynb

at

import hiddenlayer as hl
hl.build_graph(nonlinear_model, torch.zeros([1, 1]))


AttributeError Traceback (most recent call last)
in
1 import hiddenlayer as hl
----> 2 hl.build_graph(nonlinear_model, torch.zeros([1, 1]))

~/anaconda3/envs/cenv/lib/python3.7/site-packages/hiddenlayer/graph.py in build_graph(model, args, input_names, transforms, framework_transforms)
139 from .pytorch_builder import import_graph, FRAMEWORK_TRANSFORMS
140 assert args is not None, "Argument args must be provided for Pytorch models."
--> 141 import_graph(g, model, args)
142 elif framework == "tensorflow":
143 from .tf_builder import import_graph, FRAMEWORK_TRANSFORMS

~/anaconda3/envs/cenv/lib/python3.7/site-packages/hiddenlayer/pytorch_builder.py in import_graph(hl_graph, model, args, input_names, verbose)
88 shape = get_shape(torch_node)
89 # Add HL node
---> 90 hl_node = Node(uid=pytorch_id(torch_node), name=None, op=op,
91 output_shape=shape, params=params)
92 hl_graph.add_node(hl_node)

~/anaconda3/envs/cenv/lib/python3.7/site-packages/hiddenlayer/pytorch_builder.py in pytorch_id(node)
43 # After ONNX simplification, the scopeName is not unique anymore
44 # so append node outputs to guarantee uniqueness
---> 45 return node.scopeName() + "/outputs/" + "/".join([o.uniqueName() for o in node.outputs()])
46
47

~/anaconda3/envs/cenv/lib/python3.7/site-packages/hiddenlayer/pytorch_builder.py in (.0)
43 # After ONNX simplification, the scopeName is not unique anymore
44 # so append node outputs to guarantee uniqueness
---> 45 return node.scopeName() + "/outputs/" + "/".join([o.uniqueName() for o in node.outputs()])
46
47

AttributeError: 'torch._C.Value' object has no attribute 'uniqueName'

@stared
Copy link
Owner

stared commented Oct 28, 2019

@jlj0n3s I would be grateful for formatting the issue above with code blocks.

In any case, this notebook is Work in Progress and some lines may be buggy.

stared added a commit that referenced this issue Nov 28, 2019
@stared
Copy link
Owner

stared commented Nov 28, 2019

For now, removed hiddenlayer package.

@stared stared closed this as completed Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants