Why the labeled_data in train_task and eval_task in our code are the tuple with three elements

In the Trax framework, I read that the labeled_data in train_task has a tuple with (input_value, target_value). But in the assignment code, the labeled_data is the tuple with (input_value, target_value, weights).

1 Like

It is possible that the Trax framework you read is of the latest version and the one used in the course is a previous version which did things differently.

Hi @trungsanglong25

Where exactly you read that?

In general, the input is the (input_value, target_value) and weights are optional (if “None” then the weights become all 1 s)

Oh I read it by type code: help(trax.supervised.training.TrainTask)

But maybe in this version it change the help content.

You are correct, that is not stated in the documentation (including the current one).