(0) Invalid argument: In[0] mismatch In[1] shape

i’m facing this problem

tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: In[0] mismatch In[1] shape: 1108 vs. 1120: [42,1108] [1120,256] 0 0
[[node model/dense/MatMul (defined at rnn_flickr_fit.py:273) ]]
(1) Invalid argument: In[0] mismatch In[1] shape: 1108 vs. 1120: [42,1108] [1120,256] 0 0
[[node model/dense/MatMul (defined at rnn_flickr_fit.py:273) ]]
[[Adam/Cast_6/ReadVariableOp/_6]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_7431]

Function call stack:
train_function -> train_function

2021-07-02 14:23:52.766840: W tensorflow/core/kernels/data/generator_dataset_op.cc:107] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.
[[{{node PyFunc}}]]

what should i check to solve it ?

Is this related to OpenNMT? What is the file rnn_flickr_fit.py?

thanks for replying , that’s the name of my file … i searched for a solution and found the post here Erroring on inference with similar problem but excuse me how do you know that the file might have empty lines

I see that you also posted on the official TensorFlow forum which is a better place for this issue.