java-demo
java-demo copied to clipboard
NoSuchMethodError
pytorch: 1.5 statble libtorch: https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip
run command: ./gradlew run --stacktrace --debug
stop at:
<=========----> 75% EXECUTING [1m 37s]
:run
debug infomation:
2020-06-10T13:43:15.052+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry. 2020-06-10T13:43:15.052+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry. 2020-06-10T13:43:15.053+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-06-10T10:45:56.962+0800 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED 2020-06-10T10:45:56.962+0800 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/home/ks/software/jdk-9.0.4/bin/java'' 2020-06-10T10:45:56.962+0800 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled... 2020-06-10T10:45:57.206+0800 [ERROR] [system.err] Exception in thread "main" java.lang.NoSuchMethodError: nativeNewTensor 2020-06-10T10:45:57.207+0800 [ERROR] [system.err] at org.pytorch.NativePeer.forward(Native Method) 2020-06-10T10:45:57.207+0800 [ERROR] [system.err] at org.pytorch.Module.forward(Module.java:37) 2020-06-10T10:45:57.207+0800 [ERROR] [system.err] at demo.App.main(App.java:17) 2020-06-10T10:46:02.923+0800 [LIFECYCLE] [org.gradle.cache.internal.DefaultFileLockManager] 2020-06-10T10:46:02.923+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
you need upgrade the pytorch_java_only.jar to version 1.5.0.
https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip, is not 1.5.0?
https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip, is not 1.5.0?
yes,libtorch version is 1.5.0, but what's the version of your pytorch_java_only.jar ?
I downloaded from the link, it's 1.5.0
Can you try with the latest release and tell me if you're still seeing this? Please make sure that the version of libtorch that you've downloaded matches the jar that you're using.