Fixed indentation issue
Browse files
model.py
CHANGED
@@ -69,14 +69,14 @@ kl_weight = tf.keras.backend.variable(0.125)
|
|
69 |
|
70 |
|
71 |
class VAECost:
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
|
81 |
def __init__(self, model):
|
82 |
self.model = model
|
|
|
69 |
|
70 |
|
71 |
class VAECost:
|
72 |
+
"""
|
73 |
+
VAE cost with a schedule based on the Microsoft Research Blog's article
|
74 |
+
"Less pain, more gain: A simple method for VAE training with less of that KL-vanishing agony"
|
75 |
|
76 |
+
The KL weight increases linearly, until it meets a certain threshold and keeps constant
|
77 |
+
for the same number of epochs. After that, it decreases abruptly to zero again, and the
|
78 |
+
cycle repeats.
|
79 |
+
"""
|
80 |
|
81 |
def __init__(self, model):
|
82 |
self.model = model
|