Load a TorchScriptModule in C++, can I change batch size?

When I serialized my module, the instance’s dimension I passed to it was (4, 9, 32, 32), which ‘4’ represented batch size.
After I loaded it in C environment, I found I could only forward a tensor’s dimension exactly the (4, 9, 32, 32).
So is there any way I could forward an arbitrary batch size tensor in C environment.
Besides, originally the input size was (4, 1, 9, 32, 32), but it couldn’t work, so I changed it to (4, 9, 32, 32) and worked. So does it means that the torchscript module loaded in c++ can only forward a 4 dimension tensor?