pixel_norm op

This commit is contained in:
iperov 2021-05-25 14:26:48 +04:00
parent 757283d10e
commit e6e2ee7466

View file

@ -391,6 +391,11 @@ def total_variation_mse(images):
return tot_var
nn.total_variation_mse = total_variation_mse
def pixel_norm(x, axes):
return x * tf.rsqrt(tf.reduce_mean(tf.square(x), axis=axes, keepdims=True) + 1e-06)
nn.pixel_norm = pixel_norm
"""
def tf_suppress_lower_mean(t, eps=0.00001):
if t.shape.ndims != 1: