human
5. Loss
Here we will define the loss functions. Each loss should be able to compute its value and compute its gradient with respect to the input."
Please write code following the instructions in jupyter notebook style.
 Can you provide a code to 5?
assistant
#Here is code to 5.

# This is a basic class. 
# All other losses will inherit it
class Loss(object):
    
    def __init__(self):
        self.output = 0.0
        
    def forward(self, target_pred, target_true):
        return self.output
    
    def backward(self, target_pred, target_true):
        return np.zeros_like(target_pred).reshape((-1, 1))