-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexOutOfBoundsException while importing a model from configuration file #247
Comments
Could you please try the same thing with the new version 0.3.0, which will be released today? Probably this problem will be fixed? Meanwhile, you could try a new version and share results here in the issue. |
Yeah, it's gone in the new version. But another problems occured. Now I get NLP at model configuration stage
I tried to change NN config in Jupyter and specify all of parameters I see in model.json and replace other null fields in config with zeros or smth valueable, but it didn't help. Actually I'm quite new to NN projecting, so I'm not sure it should have helped Models |
Hi,
Kotlin DL v. 0.0.2
color_model.txt
I'm trying to adapt this (see 'Build & Compile the Model') section network as it shown at importing existing nn guide. I've exported model config in json format (config gist or color_model.txt in attachments) and when I try call
Sequential.loadModelConfiguration(config)
I get an exeptionCaused by: java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:373) at java.base/java.util.ArrayList.get(ArrayList.java:425) at org.jetbrains.kotlinx.dl.api.inference.keras.ModelLoaderKt.loadSequentialModelLayers(ModelLoader.kt:115) at org.jetbrains.kotlinx.dl.api.inference.keras.ModelLoaderKt.loadModelConfiguration(ModelLoader.kt:44) at org.jetbrains.kotlinx.dl.api.core.Sequential$Companion.loadModelConfiguration(Sequential.kt:66) at com.my.nets.ColorClassifier.<init>(ColorClassifier.kt:17) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
I've figured out that exception occurs at "batch_input_shape" array independently from it's size and content. Am I doing smth wrong or there really is a problem with reading?
The text was updated successfully, but these errors were encountered: