# AttributeError: 'numpy.ndarray' object has no attribute 'predict'

**URL:** <https://community.deeplearning.ai/t/attributeerror-numpy-ndarray-object-has-no-attribute-predict/113740>\
**Category:** Introduction to TF for Artificial Intelligence ...\
**Tags:** week-module-1\
**Created:** [March 29, 2022, 12:14pm UTC](https://community.deeplearning.ai/t/attributeerror-numpy-ndarray-object-has-no-attribute-predict/113740 "2022-03-29T12:14:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fazal\_Noor](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@Fazal\_Noor](https://community.deeplearning.ai/u/Fazal_Noor)\
**Post date:** [March 29, 2022, 12:14pm UTC](https://community.deeplearning.ai/t/attributeerror-numpy-ndarray-object-has-no-attribute-predict/113740/1 "2022-03-29T12:14:40Z")

</div>

AttributeError: ‘numpy.ndarray’ object has no attribute ‘predict’  
[Untitled4.ipynb](https://community.deeplearning.ai/uploads/short-url/hiC5ztcWmRAcTDd3Pj0mg4g5niX.ipynb)

 ![2022-03-29 (3)](https://global.discourse-cdn.com/dlai/original/3X/9/2/9276344fd013448b30ed1d800db9f883e3939735.jpeg)  
 ![2022-03-29 (4)](https://global.discourse-cdn.com/dlai/original/3X/b/0/b0f44432f7447c19f6ece98b8eec45d1183febe4.jpeg)  
(117.2 KB)  
how to solve this?

---

<div class="post-metadata">

**Author:** ![rakibhossain1521](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rakibhossain1521/32/15971_2.png) [@rakibhossain1521](https://community.deeplearning.ai/u/rakibhossain1521)\
**Post date:** [March 29, 2022, 12:42pm UTC](https://community.deeplearning.ai/t/attributeerror-numpy-ndarray-object-has-no-attribute-predict/113740/2 "2022-03-29T12:42:08Z")

</div>

@Fazal_Noor house\_model function should return the model after training after that you will predict using “model.predict” and another thing house\_model() function doesn’t require any parameter, so I will suggest you read the assignment and notebook carefully and try.

And feel free to ask any questions

Best Regard,  
Rakib Hossain Rifat

---

<div class="post-metadata">

**Author:** ![MayankGhogale](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@MayankGhogale](https://community.deeplearning.ai/u/MayankGhogale)\
**Post date:** [June 12, 2022, 1:05pm UTC](https://community.deeplearning.ai/t/attributeerror-numpy-ndarray-object-has-no-attribute-predict/113740/3 "2022-06-12T13:05:13Z")

</div>

Hello,  
Did your query get solved?  
Thank you
