提交 f21bcae5 编写于 作者: T TensorFlower Gardener

Merge pull request #34807 from csachs:fix_div_divide_deprecation_warnings

PiperOrigin-RevId: 286205298
Change-Id: I9aed62e561f1ad23028bcfef42d41b8d478e09b1
......@@ -1554,7 +1554,7 @@ def per_image_standardization(image):
adjusted_stddev = math_ops.maximum(stddev, min_stddev)
image -= image_mean
image = math_ops.div(image, adjusted_stddev, name=scope)
image = math_ops.divide(image, adjusted_stddev, name=scope)
return convert_image_dtype(image, orig_dtype, saturate=True)
......@@ -1823,7 +1823,7 @@ def convert_image_dtype(image, dtype, saturate=False, name=None):
# cause in.max to be mapped to above out.max but below out.max+1,
# so that the output is safely in the supported range.
scale = (scale_in + 1) // (scale_out + 1)
scaled = math_ops.div(image, scale)
scaled = math_ops.floordiv(image, scale)
if saturate:
return math_ops.saturate_cast(scaled, dtype, name=name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册