Skip to content

Commit 0cfa496

Browse files
dreissfacebook-github-bot
authored andcommitted
Clean up pytorch_android_torchvision test (#29455)
Summary: Pull Request resolved: #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
1 parent abf55eb commit 0cfa496

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

android/pytorch_android_torchvision/src/androidTest/java/org/pytorch/torchvision/TorchVisionInstrumentedTests.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
@RunWith(AndroidJUnit4.class)
1515
public class TorchVisionInstrumentedTests {
1616

17-
@Before
18-
public void setUp() {
19-
System.loadLibrary("pytorch");
20-
}
21-
2217
@Test
2318
public void smokeTest() {
2419
Bitmap bitmap = Bitmap.createBitmap(320, 240, Bitmap.Config.ARGB_8888);
@@ -27,6 +22,6 @@ public void smokeTest() {
2722
bitmap,
2823
TensorImageUtils.TORCHVISION_NORM_MEAN_RGB,
2924
TensorImageUtils.TORCHVISION_NORM_STD_RGB);
30-
assertArrayEquals(new long[] {1l, 3l, 240l, 320l}, tensor.shape);
25+
assertArrayEquals(new long[] {1l, 3l, 240l, 320l}, tensor.shape());
3126
}
3227
}

0 commit comments

Comments
 (0)