I get the following error when I try to load in a pretrained model in keras.
The model was loaded in via: KerasModelImport.importKerasModelAndWeights(path, false);
Exception in thread “main” org.deeplearning4j.nn.conf.inputs.InvalidInputTypeException: Invalid input: MergeVertex cannot merge CNN activations of different width/heights:first [channels,width,height] = [256,593,117], input 1 = [128,594,117]
at org.deeplearning4j.nn.conf.graph.MergeVertex.getOutputType(MergeVertex.java:208)
The model I load is of Unet-like architecture, but at the concatenation step {concat[Input1, Input2]}; i crop input1 if the dimensions are not equal to input2. I think this is causing the problem, as I have a function that I call at each concatenation step to check if cropping is needed and by how much. I believe the crop value is not being changed at each concatenation step in DL4j when loading in the pretrained model. And ideas or possible workarounds?