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

KeyError: 'Tensor "onnx::Clip_2052" is not found in constant values' #115

Closed
NeoKun004 opened this issue Dec 26, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working Stale

Comments

@NeoKun004
Copy link

Trying to convert a LayoutMl model to pytorch model getting this error :

KeyError Traceback (most recent call last)
/usr/local/lib/python3.8/dist-packages/onnx2torch/node_converters/clip.py in _(node, graph)
56 try:
---> 57 min_val = float(get_const_value(min_name, graph)) if min_name is not None else None
58 max_val = float(get_const_value(max_name, graph)) if max_name is not None else None

3 frames
KeyError: 'Tensor "onnx::Clip_2052" is not found in constant values'

The above exception was the direct cause of the following exception:

NotImplementedError Traceback (most recent call last)
/usr/local/lib/python3.8/dist-packages/onnx2torch/node_converters/clip.py in _(node, graph)
58 max_val = float(get_const_value(max_name, graph)) if max_name is not None else None
59 except KeyError as exc:
---> 60 raise NotImplementedError('Dynamic value of min/max is not implemented') from exc
61
62 torch_module = _create_torch_module(min_val=min_val, max_val=max_val)

NotImplementedError: Dynamic value of min/max is not implemented

@senysenyseny16
Copy link
Collaborator

Hello, @NeoKun004.

Could you provide ONNX to reproduce your issue?

@senysenyseny16 senysenyseny16 added the bug Something isn't working label Feb 4, 2023
@senysenyseny16 senysenyseny16 self-assigned this Feb 4, 2023
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Mar 7, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 10 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants