-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
ONNX export may fail for Hiera due to math.sqrt
and python type int
casts
#33181
Comments
math
and python type castsmath.sqrt
and python type int
casts
math.sqrt
and python type int
castsmath.sqrt
and python type int
casts
Hi @xenova, there are more issues with the current implementation of interpolate_pos_encoding Maybe it's better to rewrite interpolation using |
Yes I agree! Some other issues/PRs where this is discussed:
I'll try draft a PR for this soon. |
Similar to a previous issue (#31311) we had with vision models. cc @merveenoyan @amyeroberts @NielsRogge
Offending lines:
transformers/src/transformers/models/hiera/modeling_hiera.py
Line 340 in 5c1027b
transformers/src/transformers/models/hiera/modeling_hiera.py
Line 344 in 5c1027b
We should probably abstract
interpolate_pos_encoding
, since this is reused across many different vision architectures.The text was updated successfully, but these errors were encountered: