From 221e233735c1a7e7c4105ddca10b517a4b3dfacd Mon Sep 17 00:00:00 2001 From: zjzzqs Date: Sat, 25 Apr 2020 23:05:24 -0700 Subject: [PATCH] add a note: please use only 1 gpu to run LSTM, https://github.com/pytorch/pytorch/issues/21108 --- src/yews/models/polarity.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/yews/models/polarity.py b/src/yews/models/polarity.py index 0a3dae0..4ba5f1b 100644 --- a/src/yews/models/polarity.py +++ b/src/yews/models/polarity.py @@ -212,6 +212,8 @@ def polarity_v2(pretrained=False, progress=True, **kwargs): model.load_state_dict(state_dict) return model + +# note: please use only 1 gpu to run LSTM, https://github.com/pytorch/pytorch/issues/21108 class PolarityLSTM(nn.Module): r"""a LSTM neural network @author: Chujie Chen