C2W4_Assignment: Model Fit trouble: UnimplementedError: Graph execution error:

I would appreciate it if anyone can advise me how to resolve the following issue.

When I fit the model, I got the following set of error messages of UnimplementedError: Graph execution error:.

Look forward to hearing feedbacks.

Have you implemented the validation_generator in the cells above? Maybe you forgot to run that cell.

As highlighted in the stacktrace, the lables are strings and not of numeric type. When initializing labels, convert them to int / float.

Thanks @gent.spah for your feedback
Nevertheless, I run all the cells and got the error message.

Thanks @balaji.ambresh,
I did convert the datatype to float. (in the “parse_data_from_input” function.
I will send you my code.
If you could check it, I would appreciate it.

Hi @balaji.ambresh
It seems that my conversion of datatype failed somehow in the “parse_data_from_input” function.
If you could check my code in the function definition and advise me how to resolve this issue, I would appreciate it.
Best regards

Hi @balaji.ambresh
the problem is resolved.
Thanks a lot.
Best regards

I also getting this error. I am unsure on how to fix it since I have ran all the previous cells and got the expected outcomes. Any help would be appreciated.

Please click my name and message your notebook as an attachment.

There are 2 mistakes in your notebook:

  1. input_shape is incorrect.
  2. The number of units in the output layer is incorrect. Please read the 1st markdown cell carefully.

Cells are running now. Thank you very much for the assistance.


The numpy arrays are array of strings not not floats.
See your output:

Training images has shape: (27455, 28, 28) and dtype: <U3
Training labels has shape: (27455,) and dtype: <U2
Validation images has shape: (7172, 28, 28) and dtype: <U3
Validation labels has shape: (7172,) and dtype: <U2

When you convert a numpy array, you should assign the result to a variable.
Here’s an example:

>>> import numpy as np
>>> a = np.array(['1', '2'])
>>> a.dtype
>>> a.astype(int)
array([1, 2])
>>> a.dtype
>>> a = a.astype(int)
>>> a.dtype

Hi ,

I would appreciate if anyone can advise me on how to resolve the below issue

I got the following error - Unimplemented Error -Graph Execution error.

Looking forward for the feedbacks.

Thanks in advance.

Please see this thread.

Thank you very much.

It is working now.