Simply add batch_size dimension to your input, because it is essential in PyTorch to provide batch_size information even you have single image.
For instance: your input is ==> (3, 227, 227) you can easily add extra dimension for batch_size as follow:
inputs = inputs.unsqueeze(0)
In this case the shape of your input will be: (1, 3, 227, 227).