pytorch-image-models icon indicating copy to clipboard operation
pytorch-image-models copied to clipboard

XCiT torch.div 'rounding_mode' not supported in pytorch 1.7.0

Open belerico opened this issue 3 years ago • 2 comments

Hi, i've read from the official repo that the minimum pytorch version supported is 1.7.0, but in your porting torch.div with keyword argument rounding_mode='floor' is used, which is available from pytorch 1.8.0:

  • timm: https://github.com/rwightman/pytorch-image-models/blob/ef1e2e12be9ef9e04ead617685eebd0cb070289e/timm/models/xcit.py#L123
  • facebook: https://github.com/facebookresearch/xcit/blob/82f5291f412604970c39a912586e008ec009cdca/xcit.py#L45

Is there any chance that can be fixed to be 1.7.0-compatible?

belerico avatar Jul 16 '21 07:07 belerico

@belerico unfortunately in pytorch 1.9 replacing that with // or floor_divide will results in a pretty ugly warning when it's used (as it does in the official repo), in future versions it may result in an error.

rwightman avatar Jul 16 '21 19:07 rwightman

@rwightman ,Hi,What do /w and w/ mean?

140ai avatar Jul 28 '21 02:07 140ai