def __init__(self, vocaburary_size, img_feature_dim=2048, hidden_dim=512,dropout_ratio=0.5,train=True):
self.dropout_ratio = dropout_ratio
super(Image2CaptionDecoderOld, self).__init__(
embed_word= L.EmbedID(vocaburary_size, hidden_dim),
embed_image= L.Linear(img_feature_dim, hidden_dim),
lstm = L.LSTM(hidden_dim, hidden_dim),
decode_word = L.Linear(hidden_dim, vocaburary_size),
)
self.train = train
评论列表
文章目录