image-captioning-chinese
image-captioning-chinese copied to clipboard
Image Captioning in Chinese using LSTM RNN with attention mechanism
你好,我用的是COCO数据集, 两层LSTM模型, 一层用于实现自上而下的注意力,一层实现语言模型。 用jieba提取词 我将所有图片描述中,出现频率大于3次的词作为字典文件,一共有14226个词。 words = [w for w in word_freq.keys() if word_freq[w] > 3] 训练好模型后,在使用时,结果中出现多个同类型的词,比如: 放在 床上 的 笔记 笔记本 笔记本电脑 电脑 一个 小女 小女孩 女孩 站 在...
您好,我在执行您的代码时运行到 out, attn, alpha = tf.split(lstm_net.outputs, [n_hidden, d_local, a_local ** 2], axis=2) 这一步报错:tensorflow.python.framework.errors_impl.InvalidArgumentError: Sum of output sizes must match the size of the original Tensor along the split dimension or...
successfully run lstm.py there is a error when run latm_attention.py in these codes:train_op = tf.train.AdamOptimizer().minimize(loss, var_list=train_vars). error:Shapes (?, ?, 1073) and (?, ?, 512) are not compatible my configuration:pythony3.5+tensorflow1.1+GPU