You are trying to load a weight file containing 90 layers into a model with 26 layers.
时间: 2024-05-19 12:15:27 浏览: 171
解决Tensorflow2.0 tf.keras.Model.load_weights() 报错处理问题
Unfortunately, this cannot be done directly as the weight file is designed to match the architecture of the original model with 90 layers.
If you still want to use the weight file, you will need to modify the model architecture to match the original model. This could involve adding additional layers or modifying existing layers to match the dimensions of the weights in the file.
Alternatively, you could train a new model from scratch with the desired architecture of 26 layers and initialize the weights randomly or with pre-trained weights from a similar model.
阅读全文