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

I’m not sure about the details, but this line is trying to tell you that you have a dense later somewhere that is getting an in put with an unexpected shape.
Since keras layers size their weights based on the first input they see, you’re probably feeding an input with a variable sized axis to that Dense layer. Maybe the first batch was (42, 1120), and this second batch is(42, 1108)