Added get_loss_function to trainable