# Huggingface DecisionTransformer - Reward Calculation

**URL:** <https://discuss.huggingface.co/t/huggingface-decisiontransformer-reward-calculation/23176>\
**Category:** Beginners\
**Created:** [September 15, 2022, 11:53am UTC](https://discuss.huggingface.co/t/huggingface-decisiontransformer-reward-calculation/23176 "2022-09-15T11:53:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![suleymanozdel](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@suleymanozdel](https://discuss.huggingface.co/u/suleymanozdel)\
**Post date:** [September 15, 2022, 11:53am UTC](https://discuss.huggingface.co/t/huggingface-decisiontransformer-reward-calculation/23176/1 "2022-09-15T11:53:55Z")

</div>

Hi guys,

I am using Huggingface Decision Transformer Model (DecisionTransformerModel) , I would like to get the predicted action and calculate and update return in each step according to predicted action. When I look to the source code, I couldn’t see where the given rewards are processed. Thanks in advance 🙂
