<h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li>transformers version: 3.5.1</li>
<li>Platform: Linux version 3.10.107-1-tlinux2-0050</li>
<li>Python version: 3.7.6</li>
<li>PyTorch version (GPU?): 1.6.0+cu101</li>
<li>Tensorflow version (GPU?): no</li>
<li>Using GPU in script?: yes</li>
<li>Using distributed or parallel set-up in script?: yes</li>
</ul>
<h2 dir="auto">Who can help</h2>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a></p>
<h2 dir="auto">To reproduce</h2>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CUDA_VISIBLE_DEVICES=1,2 python run_glue.py \
  --model_name_or_path xlnet-base-cased \
  --task_name stsb \
  --do_eval \
  --max_seq_length 128 \
  --per_device_train_batch_size 32 \
  --per_device_eval_batch_size 8 \
  --max_steps 1200 \
  --learning_rate 2e-5 \
  --num_train_epochs 3.0 \
  --output_dir ./output/tranformer/xlnet \
  --cache_dir ./pretained_model/xlnet \
  --overwrite_output_dir \
  --overwrite_cache \
  --eval_accumulation_steps 2 \
  --gradient_accumulation_steps 1 \
  --disable_tqdm True\
  --dataloader_drop_last \
  --past_index 2"><pre class="notranslate">CUDA_VISIBLE_DEVICES=1,2 python run_glue.py \
  --model_name_or_path xlnet-base-cased \
  --task_name stsb \
  --do_eval \
  --max_seq_length 128 \
  --per_device_train_batch_size 32 \
  --per_device_eval_batch_size 8 \
  --max_steps 1200 \
  --learning_rate 2e-5 \
  --num_train_epochs 3.0 \
  --output_dir ./output/tranformer/xlnet \
  --cache_dir ./pretained_model/xlnet \
  --overwrite_output_dir \
  --overwrite_cache \
  --eval_accumulation_steps 2 \
  --gradient_accumulation_steps 1 \
  --disable_tqdm True\
  --dataloader_drop_last \
  --past_index 2</pre></div>
<h2 dir="auto">error</h2>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[INFO|trainer.py:1387] 2020-11-18 15:21:21,084 &gt;&gt; ***** Running Evaluation *****
[INFO|trainer.py:1388] 2020-11-18 15:21:21,084 &gt;&gt;   Num examples = 4000
[INFO|trainer.py:1389] 2020-11-18 15:21:21,085 &gt;&gt;   Batch size = 16
./sim/lib/python3.7/site-packages/transformers/modeling_xlnet.py:297: UserWarning: Mixed memory format inputs detected while calling the operator. The operator will output contiguous tensor even if some of the inputs are in channels_last format. (Triggered internally at  /pytorch/aten/src/ATen/native/TensorIterator.cpp:918.)
  attn_score = (ac + bd + ef) * self.scale
./sim/lib/python3.7/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
  warnings.warn('Was asked to gather along dimension 0, but all '
Traceback (most recent call last):
  File &quot;run_glue.py&quot;, line 414, in &lt;module&gt;
    main()
  File &quot;run_glue.py&quot;, line 366, in main
    eval_result = trainer.evaluate(eval_dataset=eval_dataset)
  File &quot;./sim/lib/python3.7/site-packages/transformers/trainer.py&quot;, line 1313, in evaluate
    prediction_loss_only=True if self.compute_metrics is None else None,
  File &quot;./sim/lib/python3.7/site-packages/transformers/trainer.py&quot;, line 1431, in prediction_loop
    preds_gatherer.add_arrays(self._gather_and_numpify(preds_host, &quot;eval_preds&quot;))
  File &quot;./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py&quot;, line 330, in add_arrays
    slice_len = self._nested_set_tensors(self._storage, arrays)
  File &quot;./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py&quot;, line 337, in _nested_set_tensors
    slice_len = self._nested_set_tensors(x, y)
  File &quot;./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py&quot;, line 337, in _nested_set_tensors
    slice_len = self._nested_set_tensors(x, y)
  File &quot;./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py&quot;, line 349, in _nested_set_tensors
    i * slice_len : (i + 1) * slice_len
ValueError: could not broadcast input array from shape (512,8,768) into shape (416,8,768)
```shell

Could you please help me? Thanks a lot !"><pre class="notranslate">[INFO<span class="pl-k">|</span>trainer.py:1387] 2020-11-18 15:21:21,084 <span class="pl-k">&gt;&gt;</span> <span class="pl-k">*****</span> Running Evaluation <span class="pl-k">*****</span>
[INFO<span class="pl-k">|</span>trainer.py:1388] 2020-11-18 15:21:21,084 <span class="pl-k">&gt;&gt;</span>   Num examples = 4000
[INFO<span class="pl-k">|</span>trainer.py:1389] 2020-11-18 15:21:21,085 <span class="pl-k">&gt;&gt;</span>   Batch size = 16
./sim/lib/python3.7/site-packages/transformers/modeling_xlnet.py:297: UserWarning: Mixed memory format inputs detected <span class="pl-k">while</span> calling the operator. The operator will output contiguous tensor even <span class="pl-k">if</span> some of the inputs are <span class="pl-k">in</span> channels_last format. (Triggered internally at  /pytorch/aten/src/ATen/native/TensorIterator.cpp:918.)
  attn_score = (ac + bd + ef) <span class="pl-k">*</span> self.scale
./sim/lib/python3.7/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars<span class="pl-k">;</span> will instead unsqueeze and <span class="pl-k">return</span> a vector.
  warnings.warn(<span class="pl-s"><span class="pl-pds">'</span>Was asked to gather along dimension 0, but all <span class="pl-pds">'</span></span>
Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>run_glue.py<span class="pl-pds">"</span></span>, line 414, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    <span class="pl-en">main</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>run_glue.py<span class="pl-pds">"</span></span>, line 366, <span class="pl-k">in</span> main
    eval_result = trainer.evaluate(eval_dataset=eval_dataset)
  File <span class="pl-s"><span class="pl-pds">"</span>./sim/lib/python3.7/site-packages/transformers/trainer.py<span class="pl-pds">"</span></span>, line 1313, <span class="pl-k">in</span> evaluate
    prediction_loss_only=True <span class="pl-k">if</span> self.compute_metrics is None <span class="pl-k">else</span> None,
  File <span class="pl-s"><span class="pl-pds">"</span>./sim/lib/python3.7/site-packages/transformers/trainer.py<span class="pl-pds">"</span></span>, line 1431, <span class="pl-k">in</span> prediction_loop
    preds_gatherer.add_arrays(self._gather_and_numpify(preds_host, <span class="pl-s"><span class="pl-pds">"</span>eval_preds<span class="pl-pds">"</span></span>))
  File <span class="pl-s"><span class="pl-pds">"</span>./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py<span class="pl-pds">"</span></span>, line 330, <span class="pl-k">in</span> add_arrays
    slice_len = self._nested_set_tensors(self._storage, arrays)
  File <span class="pl-s"><span class="pl-pds">"</span>./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py<span class="pl-pds">"</span></span>, line 337, <span class="pl-k">in</span> _nested_set_tensors
    slice_len = self._nested_set_tensors(x, y)
  File <span class="pl-s"><span class="pl-pds">"</span>./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py<span class="pl-pds">"</span></span>, line 337, <span class="pl-k">in</span> _nested_set_tensors
    slice_len = self._nested_set_tensors(x, y)
  File <span class="pl-s"><span class="pl-pds">"</span>./sim/lib/python3.7/site-packages/transformers/trainer_pt_utils.py<span class="pl-pds">"</span></span>, line 349, <span class="pl-k">in</span> _nested_set_tensors
    i <span class="pl-k">*</span> slice_len <span class="pl-c1">:</span> (i + 1) <span class="pl-k">*</span> slice_len
ValueError: could not broadcast input array from shape (512,8,768) into shape (416,8,768)
<span class="pl-s"><span class="pl-pds">`</span><span class="pl-pds">`</span><span class="pl-pds">`</span>shell</span>
<span class="pl-s"></span>
<span class="pl-s">Could you please <span class="pl-c1">help</span> me<span class="pl-k">?</span> Thanks a lot <span class="pl-k">!</span></span></pre></div>
<h2 dir="auto">Environment info</h2>

<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 3.3.1</li>
<li>Platform: Linux-4.15.0-117-generic-x86_64-with-glibc2.10</li>
<li>Python version: 3.8.5</li>
<li>PyTorch version (GPU?): 1.4.0 (True)</li>
<li>Tensorflow version (GPU?): 2.2.0 (False)</li>
<li>Using GPU in script?: Yes</li>
<li>Using distributed or parallel set-up in script?: No</li>
</ul>
<h3 dir="auto">Who can help</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a></p>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...): XLNet-base-cased</p>
<p dir="auto">The problem arises when using:</p>
<ul dir="auto">
<li>the official example scripts: run_glue.py</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul dir="auto">
<li>an official GLUE/SQUaD task: SST-2</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>
<p dir="auto">Install transformers from master and download SST-2 data using <code class="notranslate">download_glue_data.py</code></p>
</li>
<li>
<p dir="auto">Create the following scripts</p>
</li>
</ol>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GLUE_DIR=~/glue
CUDA_VISIBLE_DEVICES=0
TASK_NAME=SST-2

python3 ~/applications/transformers/examples/text-classification/run_glue.py \
  --model_name_or_path ~/xlnet \
  --task_name $TASK_NAME \
  --do_eval \
  --data_dir $GLUE_DIR/$TASK_NAME \
  --max_seq_length 64 \
  --per_device_train_batch_size 32 \
  --per_device_eval_batch_size 64 \
  --learning_rate 2e-5 \
  --num_train_epochs 3.0 \
  --output_dir ~/result/$TASK_NAME/ \
  --overwrite_output_dir \
  --eval_steps 100
"><pre class="notranslate">GLUE_DIR=<span class="pl-k">~</span>/glue
CUDA_VISIBLE_DEVICES=0
TASK_NAME=SST-2

python3 <span class="pl-k">~</span>/applications/transformers/examples/text-classification/run_glue.py \
  --model_name_or_path <span class="pl-k">~</span>/xlnet \
  --task_name <span class="pl-smi">$TASK_NAME</span> \
  --do_eval \
  --data_dir <span class="pl-smi">$GLUE_DIR</span>/<span class="pl-smi">$TASK_NAME</span> \
  --max_seq_length 64 \
  --per_device_train_batch_size 32 \
  --per_device_eval_batch_size 64 \
  --learning_rate 2e-5 \
  --num_train_epochs 3.0 \
  --output_dir <span class="pl-k">~</span>/result/<span class="pl-smi">$TASK_NAME</span>/ \
  --overwrite_output_dir \
  --eval_steps 100
</pre></div>
<ol start="3" dir="auto">
<li>run this script</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Trainer should return appropriate evaluation results. Here are logs when evaluating bert-base with above-given hyperparameters.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="10/05/2020 22:28:47 - INFO - filelock -   Lock 140392033291808 acquired on /data/home/liusishun/glue/SST-2/cached_dev_BertTokenizer_64_sst-2.lock
10/05/2020 22:28:47 - INFO - filelock -   Lock 140392033291808 released on /data/home/liusishun/glue/SST-2/cached_dev_BertTokenizer_64_sst-2.lock
10/05/2020 22:28:50 - INFO - __main__ -   *** Evaluate ***
Evaluation: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:01&lt;00:00,  7.22it/s]
{'eval_loss': 0.6916399122378148, 'eval_acc': 0.49770642201834864, 'step': 0}
/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer.py:1168: FutureWarning: This method is deprecated, use `Trainer.is_world_process_zero()` instead.
  warnings.warn(&quot;This method is deprecated, use `Trainer.is_world_process_zero()` instead.&quot;, FutureWarning)
10/05/2020 22:28:52 - INFO - __main__ -   ***** Eval results sst-2 *****
10/05/2020 22:28:52 - INFO - __main__ -     eval_loss = 0.6916399122378148
10/05/2020 22:28:52 - INFO - __main__ -     eval_acc = 0.49770642201834864
"><pre class="notranslate">10/05/2020 22:28:47 - INFO - filelock -   Lock 140392033291808 acquired on /data/home/liusishun/glue/SST-2/cached_dev_BertTokenizer_64_sst-2.lock
10/05/2020 22:28:47 - INFO - filelock -   Lock 140392033291808 released on /data/home/liusishun/glue/SST-2/cached_dev_BertTokenizer_64_sst-2.lock
10/05/2020 22:28:50 - INFO - __main__ -   <span class="pl-k">***</span> Evaluate <span class="pl-k">***</span>
Evaluation: 100%<span class="pl-k">|</span>███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████<span class="pl-k">|</span> 14/14 [00:<span class="pl-k">01&lt;</span>00:00,  7.22it/s]
{<span class="pl-s"><span class="pl-pds">'</span>eval_loss<span class="pl-pds">'</span></span>: 0.6916399122378148, <span class="pl-s"><span class="pl-pds">'</span>eval_acc<span class="pl-pds">'</span></span>: 0.49770642201834864, <span class="pl-s"><span class="pl-pds">'</span>step<span class="pl-pds">'</span></span>: 0}
/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer.py:1168: FutureWarning: This method is deprecated, use <span class="pl-en">`Trainer.is_world_process_zero</span>()<span class="pl-s"><span class="pl-pds">`</span> instead.</span>
<span class="pl-s">  warnings.warn(<span class="pl-s"><span class="pl-pds">"</span>This method is deprecated, use <span class="pl-s"><span class="pl-pds">`</span>Trainer.is_world_process_zero()<span class="pl-pds">`</span></span> instead.<span class="pl-pds">"</span></span>, FutureWarning)</span>
<span class="pl-s">10/05/2020 22:28:52 - INFO - __main__ -   <span class="pl-k">*****</span> Eval results sst-2 <span class="pl-k">*****</span></span>
<span class="pl-s">10/05/2020 22:28:52 - INFO - __main__ -     eval_loss = 0.6916399122378148</span>
<span class="pl-s">10/05/2020 22:28:52 - INFO - __main__ -     eval_acc = 0.49770642201834864</span>
<span class="pl-s"></span></pre></div>
<h2 dir="auto">Observed behavior</h2>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="10/05/2020 22:30:05 - INFO - filelock -   Lock 139928226197216 acquired on /data/home/liusishun/glue/SST-2/cached_dev_XLNetTokenizer_64_sst-2.lock
10/05/2020 22:30:05 - INFO - filelock -   Lock 139928226197216 released on /data/home/liusishun/glue/SST-2/cached_dev_XLNetTokenizer_64_sst-2.lock
10/05/2020 22:30:09 - INFO - __main__ -   *** Evaluate ***
Evaluation:  93%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉           | 13/14 [00:02&lt;00:00,  4.44it/s]
Traceback (most recent call last):
  File &quot;/data/home/liusishun/applications/transformers/examples/text-classification/run_glue.py&quot;, line 247, in &lt;module&gt;
    main()
  File &quot;/data/home/liusishun/applications/transformers/examples/text-classification/run_glue.py&quot;, line 197, in main
    eval_result = trainer.evaluate(eval_dataset=eval_dataset)
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer.py&quot;, line 1297, in evaluate
    output = self.prediction_loop(eval_dataloader, description=&quot;Evaluation&quot;)
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer.py&quot;, line 1382, in prediction_loop
    preds = logits if preds is None else nested_concat(preds, logits, dim=0)
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py&quot;, line 151, in nested_concat
    return type(tensors)(nested_concat(t, n, dim) for t, n in zip(tensors, new_tensors))
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py&quot;, line 151, in &lt;genexpr&gt;
    return type(tensors)(nested_concat(t, n, dim) for t, n in zip(tensors, new_tensors))
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py&quot;, line 151, in nested_concat
    return type(tensors)(nested_concat(t, n, dim) for t, n in zip(tensors, new_tensors))
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py&quot;, line 151, in &lt;genexpr&gt;
    return type(tensors)(nested_concat(t, n, dim) for t, n in zip(tensors, new_tensors))
  File &quot;/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py&quot;, line 152, in nested_concat
    return torch.cat((tensors, new_tensors), dim=dim)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 40 and 64 in dimension 1 at /opt/conda/conda-bld/pytorch_1579061855666/work/aten/src/THC/generic/THCTensorMath.cu:71"><pre class="notranslate">10/05/2020 22:30:05 - INFO - filelock -   Lock 139928226197216 acquired on /data/home/liusishun/glue/SST-2/cached_dev_XLNetTokenizer_64_sst-2.lock
10/05/2020 22:30:05 - INFO - filelock -   Lock 139928226197216 released on /data/home/liusishun/glue/SST-2/cached_dev_XLNetTokenizer_64_sst-2.lock
10/05/2020 22:30:09 - INFO - __main__ -   <span class="pl-k">***</span> Evaluate <span class="pl-k">***</span>
Evaluation:  93%<span class="pl-k">|</span>███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉           <span class="pl-k">|</span> 13/14 [00:<span class="pl-k">02&lt;</span>00:00,  4.44it/s]
Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/applications/transformers/examples/text-classification/run_glue.py<span class="pl-pds">"</span></span>, line 247, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    <span class="pl-en">main</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/applications/transformers/examples/text-classification/run_glue.py<span class="pl-pds">"</span></span>, line 197, <span class="pl-k">in</span> main
    eval_result = trainer.evaluate(eval_dataset=eval_dataset)
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer.py<span class="pl-pds">"</span></span>, line 1297, <span class="pl-k">in</span> evaluate
    output = self.prediction_loop(eval_dataloader, description=<span class="pl-s"><span class="pl-pds">"</span>Evaluation<span class="pl-pds">"</span></span>)
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer.py<span class="pl-pds">"</span></span>, line 1382, <span class="pl-k">in</span> prediction_loop
    preds = logits <span class="pl-k">if</span> preds is None <span class="pl-k">else</span> nested_concat(preds, logits, dim=0)
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py<span class="pl-pds">"</span></span>, line 151, <span class="pl-k">in</span> nested_concat
    <span class="pl-k">return</span> type(tensors)(nested_concat(t, n, dim) <span class="pl-k">for</span> <span class="pl-smi">t, n</span> <span class="pl-k">in</span> zip(tensors, new_tensors))
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py<span class="pl-pds">"</span></span>, line 151, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>genexpr<span class="pl-k">&gt;</span>
    <span class="pl-k">return</span> type(tensors)(nested_concat(t, n, dim) <span class="pl-k">for</span> <span class="pl-smi">t, n</span> <span class="pl-k">in</span> zip(tensors, new_tensors))
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py<span class="pl-pds">"</span></span>, line 151, <span class="pl-k">in</span> nested_concat
    <span class="pl-k">return</span> type(tensors)(nested_concat(t, n, dim) <span class="pl-k">for</span> <span class="pl-smi">t, n</span> <span class="pl-k">in</span> zip(tensors, new_tensors))
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py<span class="pl-pds">"</span></span>, line 151, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>genexpr<span class="pl-k">&gt;</span>
    <span class="pl-k">return</span> type(tensors)(nested_concat(t, n, dim) <span class="pl-k">for</span> <span class="pl-smi">t, n</span> <span class="pl-k">in</span> zip(tensors, new_tensors))
  File <span class="pl-s"><span class="pl-pds">"</span>/data/home/liusishun/.conda/envs/myenv/lib/python3.8/site-packages/transformers/trainer_utils.py<span class="pl-pds">"</span></span>, line 152, <span class="pl-k">in</span> nested_concat
    <span class="pl-k">return</span> torch.cat<span class="pl-s"><span class="pl-pds">((</span>tensors<span class="pl-k">,</span> new_tensors)<span class="pl-k">,</span> dim<span class="pl-k">=</span>dim)</span>
<span class="pl-s">RuntimeError: invalid argument <span class="pl-c1">0</span>: Sizes of tensors must match except in dimension <span class="pl-c1">0</span>. Got <span class="pl-c1">40</span> and <span class="pl-c1">64</span> in dimension <span class="pl-c1">1</span> at /opt/conda/conda-bld/pytorch_<span class="pl-c1">1579061855666</span>/work/aten/src/THC/generic/THCTensorMath.cu:<span class="pl-c1">71</span></span></pre></div>