# C3W3 Assignment Running Model issue

**URL:** <https://community.deeplearning.ai/t/c3w3-assignment-running-model-issue/592429>\
**Category:** Natural Language Processing in TensorFlow\
**Tags:** week-module-3\
**Created:** [March 17, 2024, 6:33am UTC](https://community.deeplearning.ai/t/c3w3-assignment-running-model-issue/592429 "2024-03-17T06:33:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![databulance](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@databulance](https://community.deeplearning.ai/u/databulance)\
**Post date:** [March 17, 2024, 6:33am UTC](https://community.deeplearning.ai/t/c3w3-assignment-running-model-issue/592429/1 "2024-03-17T06:33:02Z")

</div>

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

ValueError Traceback (most recent call last)  
 in   
5  
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

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [March 17, 2024, 6:39am UTC](https://community.deeplearning.ai/t/c3w3-assignment-running-model-issue/592429/2 "2024-03-17T06:39:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [March 17, 2024, 6:58am UTC](https://community.deeplearning.ai/t/c3w3-assignment-running-model-issue/592429/3 "2024-03-17T06:58:26Z")

</div>

From learner:

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