# Input shape in models

**URL:** <https://community.deeplearning.ai/t/input-shape-in-models/273036>\
**Category:** Custom Models, Layers and Loss Functions with TF\
**Tags:** week-module-4\
**Created:** [February 12, 2023, 7:56pm UTC](https://community.deeplearning.ai/t/input-shape-in-models/273036 "2023-02-12T19:56:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pouria\_Baghaei](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@Pouria\_Baghaei](https://community.deeplearning.ai/u/Pouria_Baghaei)\
**Post date:** [February 12, 2023, 7:56pm UTC](https://community.deeplearning.ai/t/input-shape-in-models/273036/1 "2023-02-12T19:56:40Z")

</div>

Hi ,  
I noticed that in most cases in sequential and API structure we pass the shape of input data ( either in input layer or in conv layer. but I don’t see the shapes when we are using classes to create the model. why is that ? isn’t that necessary?  
Thanks

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [February 13, 2023, 11:42am UTC](https://community.deeplearning.ai/t/input-shape-in-models/273036/2 "2023-02-13T11:42:21Z")

</div>

Those shapes are necessary. If you are using a predefined model from somewhere, lets suppose tensorflow then at the page where the model resides you should check the input sizes expected, otherwise if you pass in an incorrect shape then the model will throw an error.
