* dice loss * format code, add docstring and calculate denominator without valid_mask * minor change * restore