After testing keras model import, can DL4J take in arbitary sized input image? Model is a FCN(fully convolutional network), yolov3 model trained in keras.
in keras (not tf.keras) Input(shape=(None, None, 3))
keras model import worked when I set my input image to a fixed image, e.g. Input(shape=(608, 608, 3))
You shouldn’t do that after import, as it initializes the model, i.e. it overwrites your imported weights.
But that isn’t the problem yet, as it does’t even get that far.
Because what you’re seeing is a validation error, I guess there is not way around defining an input shape.
But I think you should still be able to apply the imported model to arbitrary sized images (as long as they are big enough to not run into size issues at another point).
Oh, you’re actually right, I’ve double checked the code, and it has been like that for quite a long time already.
There is a check that an already initialized model doesn’t get reinitialized. I still advise against having that there, as it is a no-op in that case.