# Week 1 Convolution\_model\_Application ValueError: Input 0 of layer max\_pooling2d\_7 is incompatible with the layer: expected ndim=4, found ndim=5. Full shape received: \[1, None, 64, 64, 8\]

**URL:** <https://community.deeplearning.ai/t/week-1-convolution-model-application-valueerror-input-0-of-layer-max-pooling2d-7-is-incompatible-with-the-layer-expected-ndim-4-found-ndim-5-full-shape-received-1-none-64-64-8/160180>\
**Category:** Convolutional Neural Networks\
**Tags:** coursera-platform\
**Created:** [July 12, 2022, 10:11pm UTC](https://community.deeplearning.ai/t/week-1-convolution-model-application-valueerror-input-0-of-layer-max-pooling2d-7-is-incompatible-with-the-layer-expected-ndim-4-found-ndim-5-full-shape-received-1-none-64-64-8/160180 "2022-07-12T22:11:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abz](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Abz](https://community.deeplearning.ai/u/Abz)\
**Post date:** [July 12, 2022, 10:11pm UTC](https://community.deeplearning.ai/t/week-1-convolution-model-application-valueerror-input-0-of-layer-max-pooling2d-7-is-incompatible-with-the-layer-expected-ndim-4-found-ndim-5-full-shape-received-1-none-64-64-8/160180/1 "2022-07-12T22:11:45Z")

</div>

![Screenshot (30)](https://global.discourse-cdn.com/dlai/original/3X/f/7/f71adba2d9a5d48da61a3f9e47cdb88ab9f4de6c.png)  
 ![Screenshot (31)](https://global.discourse-cdn.com/dlai/original/3X/3/9/392257c6926f4db146a6e69bb51a1afdf01451dc.png)  
I am getting this error  
ValueError: Input 0 of layer max\_pooling2d\_7 is incompatible with the layer: expected ndim=4, found ndim=5. Full shape received: [1, None, 64, 64, 8]

don’t know how to solve.

---

<div class="post-metadata">

**Author:** ![anon57530071](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@anon57530071](https://community.deeplearning.ai/u/anon57530071)\
**Post date:** [July 13, 2022, 12:18am UTC](https://community.deeplearning.ai/t/week-1-convolution-model-application-valueerror-input-0-of-layer-max-pooling2d-7-is-incompatible-with-the-layer-expected-ndim-4-found-ndim-5-full-shape-received-1-none-64-64-8/160180/2 "2022-07-13T00:18:40Z")

</div>

I believe this is an exercise for the Functional API.

You learned the Sequential API as the happyModel. The Sequential API is actually a list of layers which should be ‘comma’ separated list.  
But, what you are working now, is the Functional API that you do not need to create a list.  
So, the first step is to remove “comma” appended to each layer for this Functional API exercise.

---

<div class="post-metadata">

**Author:** ![Abz](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Abz](https://community.deeplearning.ai/u/Abz)\
**Post date:** [July 13, 2022, 5:29am UTC](https://community.deeplearning.ai/t/week-1-convolution-model-application-valueerror-input-0-of-layer-max-pooling2d-7-is-incompatible-with-the-layer-expected-ndim-4-found-ndim-5-full-shape-received-1-none-64-64-8/160180/3 "2022-07-13T05:29:56Z")

</div>

thank you so much  
it worked
