[英]Matrix size-incompatible: In[0]: [47,1000], In[1]: [4096,256]
I'm new to TensorFlow and am following a tutorial.我是 TensorFlow 的新手,正在学习教程。 I'm trying to do image captioning using VGG.我正在尝试使用 VGG 进行图像字幕。 I am getting an error that says:我收到一条错误消息:
enter image description here在此处输入图像描述
This is my code:这是我的代码:
model = define_model(vocab_size, max_length)
epochs = 20
steps = len(train_descriptions)
for i in range(epochs):
generator = data_generator(train_descriptions, train_features, tokenizer, max_length)
model.fit_generator(generator, epochs=1, steps_per_epoch=steps, verbose=1)
model.save('model_' + str(i) + '.h5')
I'm just following the tutorial but that video was taken a long time ago.我只是按照教程进行操作,但该视频是很久以前拍摄的。 Since I'm new to this I don't understand this error.因为我是新手,所以我不明白这个错误。 I tried model.fit()
also.我也试过model.fit()
。 But, nothing works.但是,没有任何效果。 Please, help me to rectify this.请帮我纠正这个问题。
https://github.com/nitinkaushik01/Deep_and_Machine_Learning_Projects/blob/master/Image_Caption_Project/Image_caption_Project.ipynb - This is the tutorial I'm following. https://github.com/nitinkaushik01/Deep_and_Machine_Learning_Projects/blob/master/Image_Caption_Project/Image_caption_Project.ipynb - 这是我正在关注的教程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.