# Compute\_layer\_style\_cost

**URL:** <https://community.deeplearning.ai/t/compute-layer-style-cost/3455>\
**Category:** Convolutional Neural Networks\
**Tags:** coursera-platform\
**Created:** [May 5, 2021, 4:47pm UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455 "2021-05-05T16:47:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tang8156](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tang8156](https://community.deeplearning.ai/u/tang8156)\
**Post date:** [May 5, 2021, 4:47pm UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455/1 "2021-05-05T16:47:11Z")

</div>

I can’t seem to get the right answer to “compute\_layer\_style\_cost” function. I am reshaping “a\_S” and “a\_G” to the following dimensions (n\_C, n\_H\*n\_W). Is this the correct way to reshape?

---

<div class="post-metadata">

**Author:** ![shivraj](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@shivraj](https://community.deeplearning.ai/u/shivraj)\
**Post date:** [May 5, 2021, 9:18pm UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455/2 "2021-05-05T21:18:36Z")

</div>

Issue Resolved so here by i am removing the post

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [May 5, 2021, 10:08pm UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455/3 "2021-05-05T22:08:51Z")

</div>

The course Honor Code says that students should not post their code, or read another student’s code.

---

<div class="post-metadata">

**Author:** ![shivraj](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@shivraj](https://community.deeplearning.ai/u/shivraj)\
**Post date:** [May 6, 2021, 5:44am UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455/4 "2021-05-06T05:44:16Z")

</div>

Hi T Mosh sorry for the inconvenience caused will remove the post now  
Thanks for notifying me

---

<div class="post-metadata">

**Author:** ![tang8156](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tang8156](https://community.deeplearning.ai/u/tang8156)\
**Post date:** [May 6, 2021, 5:59am UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455/5 "2021-05-06T05:59:38Z")

</div>

I’ve removed my code from the original post.

---

<div class="post-metadata">

**Author:** ![Fakhriddin99](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@Fakhriddin99](https://community.deeplearning.ai/u/Fakhriddin99)\
**Post date:** [June 8, 2021, 9:02am UTC](https://community.deeplearning.ai/t/compute-layer-style-cost/3455/6 "2021-06-08T09:02:19Z")

</div>

I am facing this problem too. can you explain why?
