Graph execution error which I can't find anything about

I am encountering this error which I can’t find anything about. I don’t have a variable called max_seq_length and I haven’t been able to find what it’s for.

InvalidArgumentError                      Traceback (most recent call last)
Cell In[16], line 1
----> 1 hist =, epochs=2, callbacks=[ck_cb])

File c:\Users\---\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\utils\, in filter_traceback.<locals>.error_handler(*args, **kwargs)
     67     filtered_tb = _process_traceback_frames(e.__traceback__)
     68     # To get the full stack trace, call:
     69     # `tf.debugging.disable_traceback_filtering()`
---> 70     raise e.with_traceback(filtered_tb) from None
     71 finally:
     72     del filtered_tb

File c:\Users\---\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\python\eager\, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     52 try:
     53   ctx.ensure_initialized()
---> 54   tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
     55                                       inputs, attrs, num_outputs)
     56 except core._NotOkStatusException as e:
     57   if name is not None:

InvalidArgumentError: Graph execution error:

max_seq_length <= 0
	 [[{{node CudnnRNN}}]]
	 [[sequential/lstm/PartitionedCall]] [Op:__inference_train_function_154806]

And this is the code I’m running:

hist =, epochs=2, callbacks=[ck_cb])

Hi @pasator_man, Could you provide a stand alone code to reproduce the issue. Thank You.