-
Notifications
You must be signed in to change notification settings - Fork 266
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
AttributeError: module 'torch.onnx' has no attribute '_optimize_trace' #100
Comments
Hello, |
Hello, I have made this change manually in `--------------------------------------------------------------------------- TypeError Traceback (most recent call last) in <cell line: 11>() 2 frames /usr/local/lib/python3.10/dist-packages/hiddenlayer/pytorch_builder.py in (.0) TypeError: 'torch._C.Node' object is not subscriptable` |
You need to hack more.
If you follow various old tutorials with Jupyther notebooks you might need to change stuff like
to
|
While that works, it also loses kernel size information from parameters to be included in the graph. Alternatively, you can follow the error and change # From https://github.com/pytorch/pytorch/blob/2efe4d809fdc94501fc38bf429e9a8d4205b51b6/torch/utils/tensorboard/_pytorch_graph.py#L384
def _node_get(node: torch._C.Node, key: str):
"""Gets attributes of a node which is polymorphic over return type."""
sel = node.kindOf(key)
return getattr(node, sel)(key)
torch._C.Node.__getitem__ = _node_get Now, you should be able to extract from the nodes just fine, so there should be no issues with this line. params = {k: torch_node[k] for k in torch_node.attributeNames()} Credit: TypeError: 'torch._C.Node' object is not subscriptable |
+1 with the same problem |
+1 I have the same problem |
still do not show data flow dimension |
The name of the error says it all.
Probably a version error.
Installed hiddenlayer-0.2 from source.
OS: Linux ubuntu 20 lts
torch.version = '1.13.0+cu117'
The text was updated successfully, but these errors were encountered: