Should we modify tracked buffer in this norm layer to support symbolic tracing? #1626
Unanswered
super-dainiu
asked this question in
Ideas
Replies: 3 comments
-
@super-dainiu good point, PR welcome! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank, you. |
Beta Was this translation helpful? Give feedback.
0 replies
-
FYI it's in #1633 to be merged in day or so |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/rwightman/pytorch-image-models/blob/94a91598c30125f6d95b08c7f2edcafd72b7dfa6/timm/layers/norm_act.py#L80
might be replaced with the PyTorch implementation
self.num_batches_tracked.add_(1) # type: ignore[has-type]
sourcebecause it is more tracer friendly.
This way, the tracer can detect the
add_
operand withProxy
and create a new FXNode
without assigning aProxy
to the buffer.Beta Was this translation helpful? Give feedback.
All reactions