# How to log a new tensor variable in TrainingArguments

**URL:** <https://discuss.huggingface.co/t/how-to-log-a-new-tensor-variable-in-trainingarguments/50182>\
**Category:** 🤗Transformers\
**Created:** [August 9, 2023, 8:00pm UTC](https://discuss.huggingface.co/t/how-to-log-a-new-tensor-variable-in-trainingarguments/50182 "2023-08-09T20:00:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cramraj8](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cramraj8](https://discuss.huggingface.co/u/cramraj8)\
**Post date:** [August 9, 2023, 8:00pm UTC](https://discuss.huggingface.co/t/how-to-log-a-new-tensor-variable-in-trainingarguments/50182/1 "2023-08-09T20:00:12Z")

</div>

I am using Seq2SeqTrainer class for my generation task. And I am using 2 losses in the Decoder class. I am using loss1, loss2, and loss=loss1+loss2. Currently only loss is getting logged as per log\_steps argument. But I do want to log other variable such as loss1 and loss2. How to achieve that ?
