Here is the code section with error:
Training the model
epochs = 20
batch_size = 3
number_pics_per_batch=2000
steps = len(train_descriptions)//batch_size
for i in range(epochs):
generator = data_generator(train_descriptions,encoding_train,word_to_idx,max_len,batch_size)
model.fit_generator(generator,epochs=1,steps_per_epoch=steps,verbose=1)
model.save(’/model_’+str(i)+’.h5’)
The error is:
"
ValueError: Layer model_1 expects 2 input(s), but it received 3 input tensors. Inputs received: [<tf.Tensor ‘IteratorGetNext:0’ shape=(None, None) dtype=float32>, <tf.Tensor ‘IteratorGetNext:1’ shape=(None, None) dtype=int32>, <tf.Tensor ‘IteratorGetNext:2’ shape=(None, None) dtype=float32>]"