Open Oneplus opened 7 years ago
https://github.com/AaronTengDeChuan/CDT4UD_Chinese/blob/dc33f6f1492c939219b628a66b143c0bee7b203a/multi-task_learning_for_cdt--ud/Bi_LSTM_Model.py#L47
batch_size 改变了,就需要初始化hidden和cell。 self.initCell = Variable(torch.zeros(2 if self.bidirectional else 1, _self.batchsize, self.hidden_size).cuda())
https://github.com/AaronTengDeChuan/CDT4UD_Chinese/blob/dc33f6f1492c939219b628a66b143c0bee7b203a/multi-task_learning_for_cdt--ud/Bi_LSTM_Model.py#L47