!10217 Fix TextCNN training steps problem

From: @penny369
Reviewed-by: @oacjiewen,@linqingke
Signed-off-by: @linqingke
This commit is contained in:
mindspore-ci-bot 2020-12-19 16:00:18 +08:00 committed by Gitee
commit 735820261a
2 changed files with 1 additions and 2 deletions

View File

@ -202,7 +202,6 @@ class MovieReview:
dataset = ds.GeneratorDataset(source=Generator(input_list=self.train),
column_names=["data", "label"], shuffle=False)
dataset = dataset.batch(batch_size=batch_size, drop_remainder=True)
dataset = dataset.repeat(epoch_size)
return dataset
def create_test_dataset(self, batch_size):

View File

@ -90,7 +90,7 @@ class SoftmaxCrossEntropyExpand(Cell):
def make_conv_layer(kernel_size):
return nn.Conv2d(in_channels=1, out_channels=96, kernel_size=kernel_size, padding=1,
pad_mode="pad", weight_init='uniform', has_bias=True)
pad_mode="pad", has_bias=True)
class TextCNN(nn.Cell):