java-demo icon indicating copy to clipboard operation
java-demo copied to clipboard

When windows version born ?

Open kaonick opened this issue 5 years ago • 3 comments

Hope as soon as possible...

kaonick avatar Nov 22 '19 09:11 kaonick

Hope as soon as possible...

1mrlouie avatar Feb 01 '20 15:02 1mrlouie

This now works as of PyTorch nightlies on 2 December 2020. To get this to work on Windows, you'll need to adjust the version in the gradle.build file:

 dependencies {
     // Remember to remove "-SNAPSHOT" after 1.4 is released!
-    implementation 'org.pytorch:pytorch_java_only:1.4.0-SNAPSHOT'
+    implementation 'org.pytorch:pytorch_java_only:1.8.0-SNAPSHOT'
 }

and then you'll also need to add the lib dir within LIBTORCH_HOME to the path. This is due to how native class loading works on Windows. See the below screenshot for instructions. It was tested against

openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)

Voila:

Screen Shot 2020-12-02 at 7 59 58 AM

erip avatar Dec 02 '20 13:12 erip

Wonderful!

AliceSum avatar Dec 02 '20 17:12 AliceSum