transformers
70e7d1d6 - Fixes torch jit tracing for LayoutLMv2 model (re-open) (#18313)

Commit
3 years ago
Fixes torch jit tracing for LayoutLMv2 model (re-open) (#18313) * Fixes torch jit tracing for LayoutLMv2 model. Pytorch seems to reuse memory for input_shape which caused a mismatch in shapes later in the forward pass. * Fixed code quality * avoid unneeded allocation of vector for shape
Author
Parents
Loading