This issue mark fixed at #9145 and # 9744, but the exception still exists in M2.1
exception in M2:
java.lang.NullPointerException: Cannot load from object array because “inputsForOp” is null
at org.nd4j.linalg.api.ops.impl.layers.recurrent.LSTMLayer.configureWithSameDiff(LSTMLayer.java:210)
at org.nd4j.autodiff.samediff.SameDiff.fromFlatBuffers(SameDiff.java:5503)
at org.nd4j.autodiff.samediff.SameDiff.fromFlatFile(SameDiff.java:5359)
at org.nd4j.autodiff.samediff.SameDiff.load(SameDiff.java:5250)
at org.nd4j.autodiff.listeners.checkpoint.CheckpointListener.loadCheckpoint(CheckpointListener.java:407)
exception in M2.1:
java.lang.NullPointerException: Cannot read the array length because “inputsForOp” is null
at org.nd4j.linalg.api.ops.impl.layers.recurrent.LSTMLayer.configureWithSameDiff(LSTMLayer.java:210)
at org.nd4j.autodiff.samediff.SameDiff.fromFlatBuffers(SameDiff.java:6058)
at org.nd4j.autodiff.samediff.SameDiff.fromFlatFile(SameDiff.java:5914)
at org.nd4j.autodiff.samediff.SameDiff.load(SameDiff.java:5805)
at org.nd4j.autodiff.listeners.checkpoint.CheckpointListener.loadCheckpoint(CheckpointListener.java:407)
at org.nd4j.autodiff.listeners.checkpoint.CheckpointListener.loadLastCheckpoint(CheckpointListener.java:417)
I sent you my project before, it contains the model. Or you can remove the old model and change it to use M2.1 and train several minutes and then get a model. thanks.
This issue still exists.
java.lang.NullPointerException: Cannot load from object array because “inputsForOp” is null
at org.nd4j.linalg.api.ops.impl.layers.recurrent.LSTMLayer.configureWithSameDiff(LSTMLayer.java:210)
at org.nd4j.autodiff.samediff.SameDiff.fromFlatBuffers(SameDiff.java:5503)
at org.nd4j.autodiff.samediff.SameDiff.fromFlatFile(SameDiff.java:5359)
at org.nd4j.autodiff.samediff.SameDiff.load(SameDiff.java:5250)
at org.nd4j.autodiff.listeners.checkpoint.CheckpointListener.loadCheckpoint(CheckpointListener.java:407)
at org.nd4j.autodiff.listeners.checkpoint.CheckpointListener.loadLastCheckpoint(CheckpointListener.java:417)
@SidneyLann what version are you using? If you look straight at the source this is impossible. We do a null check right here:
@SidneyLann edit: I downloaded the source for M2.1. It appears that’s still in there. It’s already fixed in master so I guess just use snapshots. I’ll be doing another release soon anyways after checking one more issue.
Thanks. But NPE at this line now:
builder.peepholeWeights(sameDiff.getVariable(inputsForOp[inputsForOp.length - 1]));
java.lang.NullPointerException: Cannot read the array length because “inputsForOp” is null
at org.nd4j.linalg.api.ops.impl.layers.recurrent.LSTMLayer.configureWithSameDiff(LSTMLayer.java:205)
@SidneyLann I wonder if this is actually burying a deeper problem somewhere…has peephole and those booleans are either wrong or the state configured there mismatches your parameters. Before we go out of our way adding null checks for everything I want to make sure that we’re not trying to just work around a problem somewhere else.
@SidneyLann I haven’t looked at this yet but the main thing I wanted to look at was to see if the neural network was imported correctly. There seems to be something off with variables being missing. I haven’t seen that a lot and want to make sure everything is correct.