Based on the error message it seems you are trying to pass a scalar input to the model, while a 4-dimensional input is needed.
Without more information I would recommend to check the input shape and try to debug, why it’s a scalar value during the test.