# C4W2\_Assignment Transformer Summarizer

**URL:** <https://community.deeplearning.ai/t/c4w2-assignment-transformer-summarizer/742889>\
**Category:** NLP with Attention Models\
**Tags:** week-module-2\
**Created:** [December 30, 2024, 9:05am UTC](https://community.deeplearning.ai/t/c4w2-assignment-transformer-summarizer/742889 "2024-12-30T09:05:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharanjit](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@Sharanjit](https://community.deeplearning.ai/u/Sharanjit)\
**Post date:** [December 30, 2024, 9:05am UTC](https://community.deeplearning.ai/t/c4w2-assignment-transformer-summarizer/742889/1 "2024-12-30T09:05:18Z")

</div>

![image](https://global.discourse-cdn.com/dlai/original/3X/d/3/d3ab1390276731be1dcd1ff88f890c92e9e8b176.png)

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [December 30, 2024, 10:44am UTC](https://community.deeplearning.ai/t/c4w2-assignment-transformer-summarizer/742889/2 "2024-12-30T10:44:19Z")

</div>

hi @Sharanjit

The GRADE FUNCTION Decoder

in def call statement

Your codes for the below step

```auto
# add positional encodings to word embedding

```

Instruction given in the exercise 3 mentions you are suppose to

Add the position encoding: self.pos\_encoding [:, :seq\_len, :] to your embedding.

Regards  
DP

---

<div class="post-metadata">

**Author:** ![Sharanjit](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@Sharanjit](https://community.deeplearning.ai/u/Sharanjit)\
**Post date:** [January 3, 2025, 4:28pm UTC](https://community.deeplearning.ai/t/c4w2-assignment-transformer-summarizer/742889/3 "2025-01-03T16:28:57Z")

</div>

Thanks for the suggestions
