When vgg16.npy carries on fine-tune, the input image size is not 224, the full connection layer dimension is wrong, how to solve it?

problem description

When

vgg16.npy performs fine-tuning, because the dimension of the input image is not 224, the dimension of the full connection layer is wrong after flattening. How to solve this problem?

the environmental background of the problems and what methods you have tried

I want to use the model that imagenet has trained to fine-tune, to train my model. I heard others say that I can resize into a 224 224 image, but I don"t know how the bosses live?

Mar.24,2022

the most direct method is

image = transform.resize(image, (w,h))
Menu