Skip to content

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Feb 15, 2021

Fixes #3393

Description:

  • Functional to_tensor returns float tensor of default dtype

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me.

Does it make sense to also change the following?

return clip.float().permute(3, 0, 1, 2) / 255.0

@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

Merging #3398 (fcf494f) into master (f04e9cb) will increase coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3398   +/-   ##
=======================================
  Coverage   74.82%   74.82%           
=======================================
  Files         105      105           
  Lines        9719     9720    +1     
  Branches     1562     1562           
=======================================
+ Hits         7272     7273    +1     
  Misses       1960     1960           
  Partials      487      487           
Impacted Files Coverage Δ
torchvision/transforms/functional.py 81.77% <75.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f04e9cb...fcf494f. Read the comment docs.

@vfdev-5
Copy link
Collaborator Author

vfdev-5 commented Feb 15, 2021

Does it make sense to also change the following?
vision/torchvision/transforms/_functional_video.py

I think this private API to be removed ?

@datumbox datumbox merged commit 067b9dc into pytorch:master Feb 15, 2021
facebook-github-bot pushed a commit that referenced this pull request Feb 23, 2021
Summary: Fixes #3393

Reviewed By: NicolasHug

Differential Revision: D26605318

fbshipit-source-id: 62e0fe24f5b4617bf130d3e05ac68ddd8061cd40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataLoader doesn't respond to set_default_tensor_type
3 participants