Open bo-ve opened 1 year ago
@bo-ve do you mind taking a crack at a pull request for this? Otherwise I can take a look at this before the next release. Thanks!
I seem to have the same problem. I cannot require the packages in my module-info file. The module-info of deeplearning.modelimport has only exports of names that are not it, such as: exports org.deeplearning4j.frameworkimport.keras.keras.layers; What it should say is probably org.deeplearning4j.nn.modelimport.keras.layers Unfortunately, thus the library cannot be used.
Great feedback! I'm unfortunately finalizing testing right now and will get to this before the release. It's taking longer than I'd like but all tests must pass on both cpu and cuda before I can finish this out. I'll do a lot more testing on java 17 to make sure everything is good. @gerrycoding could you give me more information about the environment? Could also clarify about it not being usable at all? I'm at least able to run code in java 17 no problem. It's been quite a while since M2.1 so maybe this isn't even an issue anymore.
We are building a game in JavaFX. Neural networks are supposed to strengthen the ai-players. So the idea is to build the networks with python/keras and then import them into the java project. If I have a plain Java project, not using JavaFX and thus not having any module-info file, the imports are found in the external libraries which are included via maven. So I can compile the program and load the network and make an inference. But as soon as I include any module-info file, which I need to include the FX libraries, many packages I need, are not found if I use the proper names of the the packages in my "require" declarations, since the module-info of those modules do not export them. As I quoted above, in the 'modelimport' module the names of the exports don't fit the names of the real packages. Intellij asks me to modify the module-info and add the correct exports. But of course, I cannot write to them. Im using Java 17, and the M2.1 Version. I tried to change the maven dependencies to an older version, but maven then says it cannot find them.
Issue Description
Execution under JAVA9+ fails with the module loading error: Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: C:\Users***.gradle\caches\modules-2\files-2.1\org.deeplearning4j\deeplearning4j-modelimport\1.0.0-M2.1\243b6fe760e61d75917392c4d61f318716504f1e\deeplearning4j-modelimport-1.0.0-M2.1.jar Caused by: java.lang.module.InvalidModuleDescriptorException: Package org.deeplearning4j.frameworkimport.keras.keras.layers.convolutional not found in module
Version Information
Deeplearning4j 1.0.0-M2.1
Additional Information
The issue introduced in the Misc fixes for java side for M2 release commit due to package renames, like org.deeplearning4j.frameworkimport.keras.keras.KerasModelImport =>org.deeplearning4j.nn.modelimport.keras.KerasModelImport