はい,入力画像のサイズが異なる場合は以下のようにaugmentedImageDatastoreでサイズ合わせをする必要があります。
网= alexnet;
inputSize = net.Layers (1) .InputSize;
augimdsValidation = augmentedImageDatastore(inputSize(1:2), imds);
枚数が少なければimresizeを用いて一枚一枚リサイズしても良いですが,augmentedImageDatastoreの方がデータストアとして定義した画像に対して一度にリサイズできるので便利かと思います。