# How to log a new tensor variable in TrainingArguments

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-a-new-tensor-variable-in-trainingarguments%2F50182%3E%5C
**Category:** 🤗Transformers\
**Created:** [August 9, 2023, 8:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-a-new-tensor-variable-in-trainingarguments%2F50182 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcramraj8)%5C
**Post date:** [August 9, 2023, 8:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-a-new-tensor-variable-in-trainingarguments%2F50182%2F1 "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 ?
