If you would like to pass a single sample to your model, you could load/create the sample and add the batch dimension manually to it:
# Create model
model = models.resnet50()

# Load your sample here (or create it somehow)
x = torch.randn(3, 224, 224)

# Add batch dim
x = x.unsqueeze(0)

# Forward pass
output = model(x)

You could also call model.eval() and wrap the forward pass in a with torch.no_grad() block, if you just want to run the inference.