# Problem with seq\_and\_pad function

**URL:** <https://community.deeplearning.ai/t/problem-with-seq-and-pad-function/193484>\
**Category:** Natural Language Processing in TensorFlow\
**Tags:** week-module-3, week-module-4, week-module-2\
**Created:** [August 26, 2022, 3:23pm UTC](https://community.deeplearning.ai/t/problem-with-seq-and-pad-function/193484 "2022-08-26T15:23:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ed\_Herring](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@Ed\_Herring](https://community.deeplearning.ai/u/Ed_Herring)\
**Post date:** [August 26, 2022, 3:23pm UTC](https://community.deeplearning.ai/t/problem-with-seq-and-pad-function/193484/1 "2022-08-26T15:23:45Z")

</div>

Getting this error:  
NameError: name ‘padded\_sequences’ is not defined

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [August 26, 2022, 5:42pm UTC](https://community.deeplearning.ai/t/problem-with-seq-and-pad-function/193484/2 "2022-08-26T17:42:10Z")

</div>

This error means that the variable `padded_sequences` is used before initializing it.  
Initialize it using the `sequences` variable you created in the previous step.
