Skip to content

Commit

Permalink
🔧 Fix 🐛 #109, don't call _build() if you want save into pb.
Browse files Browse the repository at this point in the history
  • Loading branch information
dathudeptrai committed Jul 11, 2020
1 parent 84c0041 commit e8a0d85
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 1 deletion.
270 changes: 270 additions & 0 deletions notebooks/fastspeech2_inference.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tensorflow_tts/models/fastspeech2.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def _inference(
duration_outputs = self.duration_predictor(
[last_encoder_hidden_states, speaker_ids, attention_mask]
) # [batch_size, length]
duration_outputs = tf.math.exp(duration_outputs) - 1.0
duration_outputs = tf.nn.relu(tf.math.exp(duration_outputs) - 1.0)
duration_outputs = tf.cast(
tf.math.round(duration_outputs * speed_ratios), tf.int32
)
Expand Down

0 comments on commit e8a0d85

Please sign in to comment.