After creating the model instance and loading the checkpoint, you would have to perform a forward and backward pass using the model:
# Model creation
model = MyModel()
# Checkpoint loading
model.load_state_dict(state_dict)
# Forward pass
output = model(data)
# Loss calculation
loss = criterion(output, target)
# Backward Pass
loss.backward()

# Now you can check the gradients

I would recommend to take a look at the tutorials 1 which explain this workflow in more detail.