L1aoXingyu / Char-RNN-PyTorch

使用PyTorch实现Char RNN生成古诗和周杰伦的歌词
141 stars 41 forks source link

gru单元出错 #6

Open LuciferTian opened 5 years ago

LuciferTian commented 5 years ago

运行到score, _ = model(x)时,出错,不知道是什么原因呢?TypeError: gru() received an invalid combination of arguments - got (Tensor, Tensor, list, float, int, float, bool, bool, bool), but expected one of:

ArnoldIOI commented 5 years ago

Same error!

lushunn commented 4 years ago

self.rnn = nn.GRU(embed_dim, hidden_size, num_layers, dropout) ,把droupout去掉就行了。

zl535320706 commented 4 years ago

can refer https://github.com/xiadingZ/video-caption.pytorch/issues/32

Lily-code111 commented 1 year ago

self.rnn = nn.GRU(embed_dim, hidden_size, num_layers, dropout) ,把droupout去掉就行了。

why?

William20234 commented 1 year ago

Could you provide some trained models in order that we don't need to train them ourselves?

windsmileknight commented 4 months ago

Define the 'dropout' as keyword argments could solve this issue, such as, self.gru = torch.GRU(xxx, xxx, xxx, dropout=dropout).