C3_W1_Assignment error in train_model function

I am getting the below error while running the train_model method. I have spent a lot of time trying to figure it out but had no luck.

Please let me know if anyone has faced the same issue and has any suggestions.


StopIteration Traceback (most recent call last)
in
2 # Take a look on how the eval_task is inside square brackets and
3 # take that into account for you train_model implementation
----> 4 training_loop = train_model(model, train_task, [eval_task], 100, output_dir_expand)

in train_model(classifier, train_task, eval_task, n_steps, output_dir)
22 )
23
—> 24 training_loop.run(n_steps = n_steps)
25
26 # Return the training_loop, since it has the model.

/opt/conda/lib/python3.7/site-packages/trax/supervised/training.py in run(self, n_steps)
433 loss_acc, step_acc = 0.0, 0
434
→ 435 loss, optimizer_metrics = self._run_one_step(task_index, task_changed)
436
437 # optimizer_metrics and loss are replicated on self.n_devices, a few

/opt/conda/lib/python3.7/site-packages/trax/supervised/training.py in _run_one_step(self, task_index, task_changed)
623
624 learning_rate = self._tasks[task_index].learning_rate(step)
→ 625 batch = self._tasks[task_index].next_batch()
626 rng = self.new_rng()
627 trainer = self._trainer_per_task[task_index]

/opt/conda/lib/python3.7/site-packages/trax/supervised/training.py in next_batch(self)
1099 def next_batch(self):
1100 “”“Returns one batch of labeled data: a tuple of input(s) plus label.”""
→ 1101 return next(self._labeled_data)
1102
1103 @property

StopIteration:

Please click my name and message your notebook as an attachment.

Thank you for the reply.

I have sent you the notebook.