DLS tries to load weights into whole model including custom layers. I think loading weights into pre-trained model “by_name” can solve this, but it is necessary then to user set “name” of layer same as other Advanced Options that are shown from the right panel, or at least generate unique names for user’s layers.
Thank you for reply. Yes, exactly, weights loading works fine when layers added on top of the model. But I have issues when adding layers to the bottom of the model
I have tried Cropping2D added after Input layer in exactly the same model as you show as example. Cropping2D parameters are ((91,90),(171,170)) so input shape (None, 3, 480, 640) should be cropped to (None, 3, 299, 299), DLS recalculates output shapes shown in model tab and it seems working fine, but when compiling model for training it says shapes error that (None, None, 91, 171) inconsistent with (None, None, -90, -170). How to properly set cropping?
Also I have tried to add few more fully convolutional layers between Input and the pre-trained model. DLS says something like “Variable uniformN already declared” where N depends on number of Convolution2D layers between Input and pre-trained model, I have tested up to 10 layers and number of ‘uniform’ variable in the error message consistent with number of added layers.