1
$\begingroup$

Most pre-trained CNN models accept a $224x224$ input size when they were trained. Can I use $256x256$ to get a higher accuracy?

$\endgroup$

1 Answer 1

1
$\begingroup$

If you change the image size, you will be able to reuse only part of the original network.

Convolutional and pooling layers can be applied to images of any size, so the initial part of the network, which normally consists of convolutions and pooling, will be reusable as-is.

However, the dense layers after the convolutional part assume certain input dimensions. Therefore, as your larger images lead to larger input to the dense layers, you won't be able to reuse the dense layers.

$\endgroup$
2
  • $\begingroup$ can you please explain the answer to this one. Do you agree to it? $\endgroup$
    – djbacs
    Commented Jul 24, 2021 at 13:56
  • $\begingroup$ The linked answer is incomplete. If you take a look at the source code link they provide, you will see that the network takes a parameter called “include_top” and only when it is true the network accepts arbitrary shapes. That parameter controls whether you only reuse the convolutional part. This is precisely what I describe in my answer. $\endgroup$
    – noe
    Commented Jul 24, 2021 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.