From c4da612ee8128a792cd7e16585a783e67898d337 Mon Sep 17 00:00:00 2001 From: wilfChen Date: Fri, 12 Jun 2020 15:54:10 +0800 Subject: [PATCH] lstm example --- mindspore/model_zoo/lstm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/model_zoo/lstm.py b/mindspore/model_zoo/lstm.py index 3b06b9399e..f014eef8df 100644 --- a/mindspore/model_zoo/lstm.py +++ b/mindspore/model_zoo/lstm.py @@ -88,6 +88,6 @@ class SentimentNet(nn.Cell): embeddings = self.trans(embeddings, self.perm) output, _ = self.encoder(embeddings, (self.h, self.c)) # states[i] size(64,200) -> encoding.size(64,400) - encoding = self.concat((output[0], output[1])) + encoding = self.concat((output[0], output[-1])) outputs = self.decoder(encoding) return outputs