Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #93 from iclementine/release/v0.2
Browse files Browse the repository at this point in the history
update to 0.2.0-beta3
  • Loading branch information
Feiyu Chan authored Feb 7, 2021
2 parents bdf2f68 + cb3ea54 commit ba39773
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion parakeet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.2.0-beta.1"
__version__ = "0.2.0-beta.3"

from parakeet import audio, data, datasets, frontend, models, modules, training, utils
8 changes: 4 additions & 4 deletions parakeet/models/transformer_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,14 @@ def __init__(self, d_input, d_hidden, d_output, dropout):
super(MLPPreNet, self).__init__()
self.lin1 = nn.Linear(d_input, d_hidden)
self.lin2 = nn.Linear(d_hidden, d_hidden)
self.lin3 = nn.Linear(d_hidden, d_hidden)
self.lin3 = nn.Linear(d_hidden, d_output)
self.dropout = dropout

def forward(self, x, dropout):
l1 = F.dropout(
F.relu(self.lin1(x)), self.dropout, training=self.training)
F.relu(self.lin1(x)), self.dropout, training=True)
l2 = F.dropout(
F.relu(self.lin2(l1)), self.dropout, training=self.training)
F.relu(self.lin2(l1)), self.dropout, training=True)
l3 = self.lin3(l2)
return l3

Expand Down Expand Up @@ -473,7 +473,7 @@ def decode(self, encoder_output, input, encoder_padding_mask):
# twice its length if needed
if x.shape[1] * self.r > self.decoder_pe.shape[0]:
new_T = max(x.shape[1] * self.r, self.decoder_pe.shape[0] * 2)
self.decoder_pe = pe.positional_encoding(0, new_T, self.d_decoder)
self.decoder_pe = pe.sinusoid_positional_encoding(0, new_T, self.d_decoder)
pos_enc = self.decoder_pe[:T_dec * self.r:self.r, :]
x = x.scale(math.sqrt(
self.d_decoder)) + pos_enc * self.decoder_pe_scalar
Expand Down

0 comments on commit ba39773

Please sign in to comment.