# Getting "could not broadcast input array from shape (2,2) into shape (2,)" on autotrain

**URL:** <https://discuss.huggingface.co/t/getting-could-not-broadcast-input-array-from-shape-2-2-into-shape-2-on-autotrain/68481>\
**Category:** 🤗AutoTrain\
**Created:** [January 9, 2024, 7:59am UTC](https://discuss.huggingface.co/t/getting-could-not-broadcast-input-array-from-shape-2-2-into-shape-2-on-autotrain/68481 "2024-01-09T07:59:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![onkar-flash](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@onkar-flash](https://discuss.huggingface.co/u/onkar-flash)\
**Post date:** [January 9, 2024, 7:59am UTC](https://discuss.huggingface.co/t/getting-could-not-broadcast-input-array-from-shape-2-2-into-shape-2-on-autotrain/68481/1 "2024-01-09T07:59:22Z")

</div>

I am trying to train facebook/bart-large-mnli with our dataset. I am getting this error when autotrain runs:

`ValueError: could not broadcast input array from shape (2,2) into shape (2,)`

I was trying this out, so I used a small dataset. The training dataset has about 65 rows, with each class having between 4-6 rows.

I am using default set of training params for this model:

```auto
{
  "lr": 0.00005,
  "epochs": 3,
  "max_seq_length": 128,
  "batch_size": 8,
  "warmup_ratio": 0.1,
  "gradient_accumulation": 1,
  "optimizer": "adamw_torch",
  "scheduler": "linear",
  "weight_decay": 0,
  "max_grad_norm": 1,
  "seed": 42,
  "logging_steps": -1,
  "auto_find_batch_size": false,
  "mixed_precision": "fp16",
  "save_total_limit": 1,
  "save_strategy": "epoch",
  "evaluation_strategy": "epoch"
}

```

---

<div class="post-metadata">

**Author:** ![onkar-flash](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@onkar-flash](https://discuss.huggingface.co/u/onkar-flash)\
**Post date:** [January 9, 2024, 8:01am UTC](https://discuss.huggingface.co/t/getting-could-not-broadcast-input-array-from-shape-2-2-into-shape-2-on-autotrain/68481/2 "2024-01-09T08:01:27Z")

</div>

cc @abhishek

This looks like a rookie error, but unable to pinpoint what!

---

<div class="post-metadata">

**Author:** ![rahattar](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@rahattar](https://discuss.huggingface.co/u/rahattar)\
**Post date:** [February 26, 2024, 11:58pm UTC](https://discuss.huggingface.co/t/getting-could-not-broadcast-input-array-from-shape-2-2-into-shape-2-on-autotrain/68481/3 "2024-02-26T23:58:13Z")

</div>

I have the same issue
