pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.28k stars 6.96k forks source link

Can we add datatype support for examples under references #8503

Open wincent8 opened 4 months ago

wincent8 commented 4 months ago

🚀 The feature

currently the examples under references only support default datatype (float32), can we support a argument like --data-type to allow user to specify the datatype for the model?

Motivation, pitch

Many users like us always need to run different dataytpye for the model. like float16 and bfloat16. If this argument can be added, it will save many efforts.

Alternatives

No response

Additional context

No response

NicolasHug commented 4 months ago

Hi @wincent8 , thanks for the feature request. Sure, happy to consider a PR if it doesn't make the code much more complex.

abhi-glitchhg commented 4 months ago

Hey @NicolasHug , I would like to work on this.