# 'float' object has no attribute 'model'

**URL:** <https://community.deeplearning.ai/t/float-object-has-no-attribute-model/141772>\
**Category:** Introduction to TF for Artificial Intelligence ...\
**Tags:** week-module-4\
**Created:** [June 18, 2022, 8:36am UTC](https://community.deeplearning.ai/t/float-object-has-no-attribute-model/141772 "2022-06-18T08:36:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himanshu\_Sharma2](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@Himanshu\_Sharma2](https://community.deeplearning.ai/u/Himanshu_Sharma2)\
**Post date:** [June 18, 2022, 8:36am UTC](https://community.deeplearning.ai/t/float-object-has-no-attribute-model/141772/1 "2022-06-18T08:36:40Z")

</div>

i am having this problem

 ![2022-06-18 (1)](https://global.discourse-cdn.com/dlai/original/3X/2/d/2d81c4ba7fb550c8b55e066fd095ef7444e1510f.png)

---

<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:** [June 18, 2022, 12:53pm UTC](https://community.deeplearning.ai/t/float-object-has-no-attribute-model/141772/2 "2022-06-18T12:53:09Z")

</div>

Please see if your `train_happy_sad_model` function returns a float instead of the history object.
