C3W3 Assignment Running Model issue

Unable to run the model. I tried various loss functions by helpless.
Epoch 1/20

ValueError Traceback (most recent call last)
6 # Train the model and save the training history
----> 7 history = model.fit(train_pad_trunc_seq, train_labels, epochs=20, validation_data=(val_pad_trunc_seq, val_labels))

/opt/conda/lib/python3.8/site-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.traceback)
—> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb

/opt/conda/lib/python3.8/site-packages/tensorflow/python/framework/func_graph.py in autograph_handler(*args, **kwargs)
1127 except Exception as e: # pylint:disable=broad-except
1128 if hasattr(e, “ag_error_metadata”):
→ 1129 raise e.ag_error_metadata.to_exception(e)
1130 else:
1131 raise

1 Like

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

1 Like

From learner:

My bad, However I found the issue. validations labels was wrongly set. Thank you for prompt feedback.

1 Like