It can differ from the training value, but you will get better inference performance on the same image size as used for the training. More precisely, if the object size in inference mode will be the same as the one the model was trained on.
As I understand, the default value of 'imgsz' argument for inference is taken from the model object and will be the same as used for model training. You can change it depending on your needs, for example, a smaller image size in inference mode can give you faster inference.
A single integer value will mean that images will be resized having a larger dimension equal to this integer (divisible by 32). Also, only for inference, you can pass two values for image height and width, for example, imgsz=[384,640].