Based on the error message it seems you are passing the class nn.MSELoss to the tensorboard visualization instead of a tensor or array containing the loss value.
Could you check the type of all objects and make sure they are valid values and not the loss function itself?