Classpath issues - nd4j does not load in Java Workspace
- Dominant language
- Jupyter Notebook
- Stars
- 2.9k
- Forks
- 383
- PR merge metrics
- No merged PRs in 30d
Description
I wanted to implement some DL4J examples in Java but I was running into some errors because the Nd4j Backend could not be loaded. I traced the issue to the following call:
- ServiceLoader.load(Nd4jBackend.class)
This is using the Thread.currentThread().getContextClassLoader() and there the classes which were loaded via %classpath add mvn org.nd4j:nd4j-native-platform:1.0.0-beta2 are missing.
I can use the workaround by calling 'Thread.currentThread().setContextClassLoader(Nd4j.class.getClassLoader())' in my Workspace to make the issue go away. But I tent do think that this should be corrected in the basic code.
In Scala the same example is working correctly as expected.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.