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
3edcd9a173
commit
faf2a4a885
1 changed files with 3 additions and 2 deletions
|
@ -508,8 +508,9 @@ 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]])
|
||||
x = tf.random.categorical(probs, num_labels)
|
||||
x = tf.cast(x, tf.float32)
|
||||
x = x * (1-smoothing) + (smoothing/num_labels)
|
||||
# x = tf.math.scalar_mul(1-smoothing, x) + (smoothing/x.shape[1])
|
||||
# x = x * (1-smoothing) + (smoothing/num_labels)
|
||||
x = tf.math.scalar_mul(1-smoothing, x)
|
||||
x = x + (smoothing/num_labels)
|
||||
x = tf.reshape(x, (self.batch_size,) + tensor.shape[1:])
|
||||
return x
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue