Implement three common loss functions from scratch using PyTorch tensor operations: mean squared error, cross-entropy, and Huber loss.