# ValueError: batch\_size should be a positive integer value, but got batch\_size=(1, 1, 1, 1)

**URL:** <https://discuss.huggingface.co/t/valueerror-batch-size-should-be-a-positive-integer-value-but-got-batch-size-1-1-1-1/42812>\
**Category:** 🤗Transformers\
**Created:** [June 11, 2023, 5:54am UTC](https://discuss.huggingface.co/t/valueerror-batch-size-should-be-a-positive-integer-value-but-got-batch-size-1-1-1-1/42812 "2023-06-11T05:54:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChXD](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@ChXD](https://discuss.huggingface.co/u/ChXD)\
**Post date:** [June 11, 2023, 5:54am UTC](https://discuss.huggingface.co/t/valueerror-batch-size-should-be-a-positive-integer-value-but-got-batch-size-1-1-1-1/42812/1 "2023-06-11T05:54:49Z")

</div>

I am a beginner at Huggingface. When I tried to run trainer. train() using four GPUs, this error occurred.Could someone help me? 😭 😭 😭

---

<div class="post-metadata">

**Author:** ![abhinavp](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@abhinavp](https://discuss.huggingface.co/u/abhinavp)\
**Post date:** [June 11, 2023, 9:36pm UTC](https://discuss.huggingface.co/t/valueerror-batch-size-should-be-a-positive-integer-value-but-got-batch-size-1-1-1-1/42812/2 "2023-06-11T21:36:10Z")

</div>

Please provide code so others can reproduce your problem, or at least enough code to understand what you’re doing, along with more details, such as a full stack trace.
