Skip to content

Commit

Permalink
Merge branch 'master' into generalize-decompression
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier authored Feb 23, 2021
2 parents 563cfa2 + 67b2528 commit 9c58f2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions android/test_app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ android {
aar {
dimension "build"
}
nightly {
dimension "build"
}
local {
dimension "build"
}
Expand Down Expand Up @@ -106,7 +103,6 @@ dependencies {

implementation 'org.pytorch:pytorch_android:1.8.0-SNAPSHOT'
implementation 'org.pytorch:pytorch_android_torchvision:1.8.0-SNAPSHOT'
implementation 'org.pytorch:torchvision_ops:0.0.1-SNAPSHOT'

aarImplementation(name: 'pytorch_android-release', ext: 'aar')
aarImplementation(name: 'pytorch_android_torchvision-release', ext: 'aar')
Expand Down
4 changes: 2 additions & 2 deletions torchvision/transforms/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def to_tensor(pic):
return img

if accimage is not None and isinstance(pic, accimage.Image):
nppic = np.zeros([pic.channels, pic.height, pic.width], dtype=default_float_dtype)
nppic = np.zeros([pic.channels, pic.height, pic.width], dtype=np.float32)
pic.copyto(nppic)
return torch.from_numpy(nppic)
return torch.from_numpy(nppic).to(dtype=default_float_dtype)

# handle PIL Image
if pic.mode == 'I':
Expand Down

0 comments on commit 9c58f2d

Please sign in to comment.