<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def loss(self, x_data, y_true):
 """ Forward propagate network and return a value of loss function """

        y_pred = self(x_data)
        return y_pred, self.loss_value(x_data, y_true, y_pred)