there isn’t an inbuilt loss, but you can simply create a loss function that takes Variables x and y and computes the mutual information. The backward is automatically computed using autograd.
def mutual_info_loss(x, y):
   # implement it using torch.* operations, etc., such as torch.log(x)
   return loss

# later...
loss.backward()