transformers
17b06e2c - Fix Swinv2ForImageClassification NaN output (#29981)

Commit
1 year ago
Fix Swinv2ForImageClassification NaN output (#29981) To address the issue of NaN logit outputs for certain combinations of the `image_size`, `patch_size` and `depths` configuration parameters, an assertion was made to ensure that the resulting `window_size` field in the model's Self Attention class is greater than 1, preventing divisions by zero in the normalization of `relative_coords_table`. Fix: #28675
Author
Miguel Almeida
Parents
Loading