Skip to content

Commit ddfb7e9

Browse files
committed
🙈 Change default to TF 2.3.1, reduce 30% memory by using new swish implementation.
1 parent f6721a7 commit ddfb7e9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# TODO(@dathudeptrai) update requirement if needed.
2323
requirements = {
2424
"install": [
25-
"tensorflow-gpu>=2.3.0",
25+
"tensorflow-gpu>=2.3.1",
2626
"tensorflow-addons>=0.10.0",
2727
"setuptools>=38.5.1",
2828
"librosa>=0.7.0",

‎tensorflow_tts/models/fastspeech.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def gelu_new(x):
4545

4646
def swish(x):
4747
"""Swish activation function."""
48-
return x * tf.sigmoid(x)
48+
return tf.nn.swish(x)
4949

5050

5151
def mish(x):

‎tensorflow_tts/models/tacotron2.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def gelu_new(x):
5252

5353
def swish(x):
5454
"""Swish activation function."""
55-
return x * tf.sigmoid(x)
55+
return tf.nn.swish(x)
5656

5757

5858
def mish(x):

0 commit comments

Comments
 (0)