CNN expects uniform image sizes. If you are feeding your model with varying input images, it will result in feature vectors of varying sizes. You can address this either by resizing or padding the image.