打印show attend and tell的解码器网络结构
生活随笔
收集整理的這篇文章主要介紹了
打印show attend and tell的解码器网络结构
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
打印show attend and tell的解碼器網絡結構
if checkpoint is None:# 執行這一步decoder = DecoderWithAttention(attention_dim=attention_dim,embed_dim=emb_dim,decoder_dim=decoder_dim,vocab_size=len(word_map),dropout=dropout)print(decoder)decoder_optimizer = torch.optim.Adam(params=filter(lambda p: p.requires_grad, decoder.parameters()),lr=decoder_lr)print(decoder_optimizer)解碼器結構:
DecoderWithAttention((attention): Attention((encoder_att): Linear(in_features=2048, out_features=512, bias=True)(decoder_att): Linear(in_features=512, out_features=512, bias=True)(full_att): Linear(in_features=512, out_features=1, bias=True)(relu): ReLU()(softmax): Softmax(dim=1))(embedding): Embedding(2633, 512)(dropout): Dropout(p=0.5, inplace=False)(decode_step): LSTMCell(2560, 512)(init_h): Linear(in_features=2048, out_features=512, bias=True)(init_c): Linear(in_features=2048, out_features=512, bias=True)(f_beta): Linear(in_features=512, out_features=2048, bias=True)(sigmoid): Sigmoid()(fc): Linear(in_features=512, out_features=2633, bias=True) )優化器結構:
Adam ( Parameter Group 0amsgrad: Falsebetas: (0.9, 0.999)eps: 1e-08lr: 0.0004weight_decay: 0 )總結
以上是生活随笔為你收集整理的打印show attend and tell的解码器网络结构的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 学习对比学习
- 下一篇: 打印show attend and te