mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-21 22:13:20 -07:00
fix error
This commit is contained in:
parent
3e7fb39cad
commit
3edcd9a173
1 changed files with 2 additions and 1 deletions
|
@ -508,7 +508,8 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
|
||||||
probs = tf.math.log([[noise, 1-noise]]) if label == 1 else tf.math.log([[1-noise, noise]])
|
probs = tf.math.log([[noise, 1-noise]]) if label == 1 else tf.math.log([[1-noise, noise]])
|
||||||
x = tf.random.categorical(probs, num_labels)
|
x = tf.random.categorical(probs, num_labels)
|
||||||
x = tf.cast(x, tf.float32)
|
x = tf.cast(x, tf.float32)
|
||||||
x = x * (1-smoothing) + (smoothing/x.shape[1])
|
x = x * (1-smoothing) + (smoothing/num_labels)
|
||||||
|
# x = tf.math.scalar_mul(1-smoothing, x) + (smoothing/x.shape[1])
|
||||||
x = tf.reshape(x, (self.batch_size,) + tensor.shape[1:])
|
x = tf.reshape(x, (self.batch_size,) + tensor.shape[1:])
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue