# Variable length setences allowed or padding needs to be done?

**URL:** <https://community.deeplearning.ai/t/variable-length-setences-allowed-or-padding-needs-to-be-done/535051>\
**Category:** Sequence Models\
**Tags:** week-module-3, coursera-platform\
**Created:** [January 4, 2024, 8:21am UTC](https://community.deeplearning.ai/t/variable-length-setences-allowed-or-padding-needs-to-be-done/535051 "2024-01-04T08:21:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palash\_Munshi](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@Palash\_Munshi](https://community.deeplearning.ai/u/Palash_Munshi)\
**Post date:** [January 4, 2024, 8:21am UTC](https://community.deeplearning.ai/t/variable-length-setences-allowed-or-padding-needs-to-be-done/535051/1 "2024-01-04T08:21:26Z")

</div>

In the Week 3 assignment (Machine Translation), we used the corpus as dates and the dates were considered as strings of fixed length (30 was the length of each string as per the assignment). But, will we also pad the sentences for natural language machine translation as well, or keep it variable length and let the model handle that?

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [January 4, 2024, 9:47am UTC](https://community.deeplearning.ai/t/variable-length-setences-allowed-or-padding-needs-to-be-done/535051/2 "2024-01-04T09:47:16Z")

</div>

The sentences need to be padded to a fixed length.
