Role of choosing correct loss function