mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 13:02:15 -07:00
pixel_norm op
This commit is contained in:
parent
757283d10e
commit
e6e2ee7466
1 changed files with 6 additions and 1 deletions
|
@ -391,6 +391,11 @@ def total_variation_mse(images):
|
||||||
return tot_var
|
return tot_var
|
||||||
nn.total_variation_mse = total_variation_mse
|
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):
|
def tf_suppress_lower_mean(t, eps=0.00001):
|
||||||
if t.shape.ndims != 1:
|
if t.shape.ndims != 1:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue