# Problem in assignment C1W2\_Assignment of course Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and

**URL:** <https://dlai.staged-by-discourse.com/t/problem-in-assignment-c1w2-assignment-of-course-introduction-to-tensorflow-for-artificial-intelligence-machine-learning-and/241154>\
**Category:** Supervised ML: Regression and Classification\
**Tags:** week-module-3\
**Created:** [December 11, 2022, 9:54pm UTC](https://dlai.staged-by-discourse.com/t/problem-in-assignment-c1w2-assignment-of-course-introduction-to-tensorflow-for-artificial-intelligence-machine-learning-and/241154 "2022-12-11T21:54:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maryam\_Alizadeh](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Maryam\_Alizadeh](https://dlai.staged-by-discourse.com/u/Maryam_Alizadeh)\
**Post date:** [December 11, 2022, 9:54pm UTC](https://dlai.staged-by-discourse.com/t/problem-in-assignment-c1w2-assignment-of-course-introduction-to-tensorflow-for-artificial-intelligence-machine-learning-and/241154/1 "2022-12-11T21:54:29Z")

</div>

In Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and… course I am trying to complete the week 2 lab which is about callbacks in training a model.  
when I run hist = train\_mnist(x\_train, y\_train) command , the following error is shown:

AttributeError: ‘myCallback’ object has no attribute ‘set\_model’

Can anybody help me?

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/tmosh/32/9321_2.png) [@TMosh](https://dlai.staged-by-discourse.com/u/TMosh)\
**Post date:** [December 11, 2022, 10:57pm UTC](https://dlai.staged-by-discourse.com/t/problem-in-assignment-c1w2-assignment-of-course-introduction-to-tensorflow-for-artificial-intelligence-machine-learning-and/241154/2 "2022-12-11T22:57:44Z")

</div>

Are you running the notebook in Coursera Labs, or have you installed the notebook on some other platform?

---

<div class="post-metadata">

**Author:** ![Maryam\_Alizadeh](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Maryam\_Alizadeh](https://dlai.staged-by-discourse.com/u/Maryam_Alizadeh)\
**Post date:** [December 12, 2022, 10:12am UTC](https://dlai.staged-by-discourse.com/t/problem-in-assignment-c1w2-assignment-of-course-introduction-to-tensorflow-for-artificial-intelligence-machine-learning-and/241154/3 "2022-12-12T10:12:14Z")

</div>

I am launching the nootebook and writing codes there.

---

<div class="post-metadata">

**Author:** ![Maryam\_Alizadeh](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Maryam\_Alizadeh](https://dlai.staged-by-discourse.com/u/Maryam_Alizadeh)\
**Post date:** [December 12, 2022, 10:33am UTC](https://dlai.staged-by-discourse.com/t/problem-in-assignment-c1w2-assignment-of-course-introduction-to-tensorflow-for-artificial-intelligence-machine-learning-and/241154/4 "2022-12-12T10:33:36Z")

</div>

The problem has been solved. I forgot to put tf.keras.callbacks.Callback parameter in callback class definition.
