mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
7 lines
198 B
Python
7 lines
198 B
Python
|
|
def fx_float_to_int(x: float) -> int:
|
|
"""
|
|
Symbolic tracing helper to substitute for inbuilt `int`.
|
|
Hint: Inbuilt `int` can't accept an argument of type `Proxy`
|
|
"""
|
|
return int(x) |