From 216bba97599af72e3e2b8dabf58fe865ed30fd0b Mon Sep 17 00:00:00 2001 From: erogol Date: Tue, 23 Jun 2020 21:55:51 +0200 Subject: [PATCH] add new test sentence --- layers/custom_layers.py | 24 ------------------------ train.py | 5 +++-- 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 layers/custom_layers.py diff --git a/layers/custom_layers.py b/layers/custom_layers.py deleted file mode 100644 index 72668c97..00000000 --- a/layers/custom_layers.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 -# import torch -# from torch import nn - -# class StopProjection(nn.Module): -# r""" Simple projection layer to predict the "stop token" - -# Args: -# in_features (int): size of the input vector -# out_features (int or list): size of each output vector. aka number -# of predicted frames. -# """ - -# def __init__(self, in_features, out_features): -# super(StopProjection, self).__init__() -# self.linear = nn.Linear(in_features, out_features) -# self.dropout = nn.Dropout(0.5) -# self.sigmoid = nn.Sigmoid() - -# def forward(self, inputs): -# out = self.dropout(inputs) -# out = self.linear(out) -# out = self.sigmoid(out) -# return out diff --git a/train.py b/train.py index bdafaeba..189a6baa 100644 --- a/train.py +++ b/train.py @@ -333,7 +333,7 @@ def evaluate(model, criterion, ap, global_step, epoch): if c.stopnet: loss_dict['stopnet_loss'] = reduce_tensor(loss_dict['stopnet_loss'].data, num_gpus) - # detach loss values + # detach loss values loss_dict_new = dict() for key, value in loss_dict.items(): if isinstance(value, (int, float)): @@ -388,7 +388,8 @@ def evaluate(model, criterion, ap, global_step, epoch): "It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.", "Be a voice, not an echo.", "I'm sorry Dave. I'm afraid I can't do that.", - "This cake is great. It's so delicious and moist." + "This cake is great. It's so delicious and moist.", + "Prior to November 22, 1963." ] else: with open(c.test_sentences_file, "r") as f: