# Assignment of Course 3 week 2

**URL:** <https://community.deeplearning.ai/t/assignment-of-course-3-week-2/238327>\
**Category:** NLP with Sequence Models\
**Tags:** week-module-2\
**Created:** [December 4, 2022, 4:51pm UTC](https://community.deeplearning.ai/t/assignment-of-course-3-week-2/238327 "2022-12-04T16:51:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sachin\_B\_S](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@sachin\_B\_S](https://community.deeplearning.ai/u/sachin_B_S)\
**Post date:** [December 4, 2022, 4:51pm UTC](https://community.deeplearning.ai/t/assignment-of-course-3-week-2/238327/1 "2022-12-04T16:51:59Z")

</div>

In this assignment of language model generation, we use same inputs and outputs.  
That is if input is “abcdef” , we expect model to generate “abcdef”. So what is preventing the model from learning identity and to completely ignore the sequence?  
Ideally the input should be “abcdef” and output should be “bcedfg” right? I am also sensing the problem in the modelling itself. I think we should predict probabilities of just one character given the sequence of previous n characters instead. Basically make the model many to one instead of many to many.  
I mean abc-\>d , bcd-\>e etc…

---

<div class="post-metadata">

**Author:** ![reinoudbosch](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@reinoudbosch](https://community.deeplearning.ai/u/reinoudbosch)\
**Post date:** [December 5, 2022, 9:14am UTC](https://community.deeplearning.ai/t/assignment-of-course-3-week-2/238327/2 "2022-12-05T09:14:08Z")

</div>

Hi sachin\_B\_S,

Note that GRULM contains a ShiftRight layer. As you can read in the [docs](https://trax-ml.readthedocs.io/en/latest/trax.layers.html#trax.layers.attention.ShiftRight), the default value for the number of shifts to the right is equal to 1. So in default mode, the model will attempt to predict the next character.
