# Exercise 4 - train\_model

**URL:** <https://community.deeplearning.ai/t/exercise-4-train-model/274906>\
**Category:** NLP with Sequence Models\
**Tags:** week-module-4\
**Created:** [February 16, 2023, 3:26am UTC](https://community.deeplearning.ai/t/exercise-4-train-model/274906 "2023-02-16T03:26:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjil](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/anjil/32/5704_2.png) [@anjil](https://community.deeplearning.ai/u/anjil)\
**Post date:** [February 16, 2023, 3:26am UTC](https://community.deeplearning.ai/t/exercise-4-train-model/274906/1 "2023-02-16T03:26:10Z")

</div>

In  
`train_model`

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

lr\_schedule is in Args description but i cant see on  
here

```auto
def train_model(Siamese, TripletLoss
                ,train_generator, val_generator, output_dir='model/'):

```

is `lr_schedule` is missing ?

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [February 16, 2023, 9:37am UTC](https://community.deeplearning.ai/t/exercise-4-train-model/274906/2 "2023-02-16T09:37:13Z")

</div>

Hi @anjil,

Good catch. It is not missing, it must have been left there from an older version of the assignment. I shall remove its mention soon.

Thanks,  
Mubsi

---

<div class="post-metadata">

**Author:** ![anjil](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/anjil/32/5704_2.png) [@anjil](https://community.deeplearning.ai/u/anjil)\
**Post date:** [February 17, 2023, 6:15am UTC](https://community.deeplearning.ai/t/exercise-4-train-model/274906/3 "2023-02-17T06:15:36Z")

</div>

okay

this is my lab id xmetubtbmgay

do i need to make any changes there

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [February 17, 2023, 2:10pm UTC](https://community.deeplearning.ai/t/exercise-4-train-model/274906/4 "2023-02-17T14:10:04Z")

</div>

You can get a fresh copy of the notebook by following these [instructions](https://www.coursera.org/learn/sequence-models-in-nlp/supplement/6ThZO/how-to-refresh-your-workspace), if you are interested. I have already made the fix.

---

<div class="post-metadata">

**Author:** ![anjil](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/anjil/32/5704_2.png) [@anjil](https://community.deeplearning.ai/u/anjil)\
**Post date:** [February 18, 2023, 4:16am UTC](https://community.deeplearning.ai/t/exercise-4-train-model/274906/5 "2023-02-18T04:16:13Z")

</div>

Thank you so much for correcting error.
