From 0cfa4965a24a1978a90ff7f39e3ec896e8b67ff7 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Fri, 8 Nov 2019 14:25:03 -0800 Subject: [PATCH] Clean up pytorch_android_torchvision test (#29455) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/29455 - Don't need to load native library. - Shape is now private. Test Plan: Ran test. Reviewed By: IvanKobzarev Differential Revision: D18405213 fbshipit-source-id: e1d1abcf2122332317693ce391e840904b69e135 --- .../pytorch/torchvision/TorchVisionInstrumentedTests.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/android/pytorch_android_torchvision/src/androidTest/java/org/pytorch/torchvision/TorchVisionInstrumentedTests.java b/android/pytorch_android_torchvision/src/androidTest/java/org/pytorch/torchvision/TorchVisionInstrumentedTests.java index 91957e88434..efca07ef7d5 100644 --- a/android/pytorch_android_torchvision/src/androidTest/java/org/pytorch/torchvision/TorchVisionInstrumentedTests.java +++ b/android/pytorch_android_torchvision/src/androidTest/java/org/pytorch/torchvision/TorchVisionInstrumentedTests.java @@ -14,11 +14,6 @@ import static org.junit.Assert.assertArrayEquals; @RunWith(AndroidJUnit4.class) public class TorchVisionInstrumentedTests { - @Before - public void setUp() { - System.loadLibrary("pytorch"); - } - @Test public void smokeTest() { Bitmap bitmap = Bitmap.createBitmap(320, 240, Bitmap.Config.ARGB_8888); @@ -27,6 +22,6 @@ public class TorchVisionInstrumentedTests { bitmap, TensorImageUtils.TORCHVISION_NORM_MEAN_RGB, TensorImageUtils.TORCHVISION_NORM_STD_RGB); - assertArrayEquals(new long[] {1l, 3l, 240l, 320l}, tensor.shape); + assertArrayEquals(new long[] {1l, 3l, 240l, 320l}, tensor.shape()); } }