Neural network Facebook's W2V2

username: 18bcs3399
cooked: <p>RuntimeError Traceback (most recent call last) Cell In[24], <a>line 1</a> ----&gt; <a>1</a> trainer.train() File d:\Extra\Python_3.11\Lib\site-packages\transformers\trainer.py:1662, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) [1657](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1657) self.model_wrapped = self.model [1659](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1659) inner_training_loop = find_executable_batch_size( [1660](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1660) self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size [1661](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1661) ) → [1662](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1662) return inner_training_loop( [1663](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1663) args=args, [1664](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1664) resume_from_checkpoint=resume_from_checkpoint, [1665](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1665) trial=trial, [1666](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1666) ignore_keys_for_eval=ignore_keys_for_eval, [1667](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1667) ) File d:\Extra\Python_3.11\Lib\site-packages\transformers\trainer.py:1929, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) [1927](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1927) tr_loss_step = self.training_step(model, inputs) [1928](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1928) else: → [1929](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1929) tr_loss_step = self.training_step(model, inputs) [1931](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1931) if ( [1932](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1932) args.logging_nan_inf_filter [1933](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1933) and not is_torch_tpu_available() [1934](file:///D:/Extra/Python_3.11/Lib/site-packages/transformers/trainer.py:1934) and (torch.isnan(tr_loss_step) or torch.isinf(tr_loss_step))</p>
<p>…</p>
<p>[305](file:///D:/Extra/Python_3.11/Lib/site-packages/torch/nn/modules/conv.py:305) _single(0), self.dilation, self.groups) → [306](file:///D:/Extra/Python_3.11/Lib/site-packages/torch/nn/modules/conv.py:306) return F.conv1d(input, weight, bias, self.stride, [307](file:///D:/Extra/Python_3.11/Lib/site-packages/torch/nn/modules/conv.py:307) self.padding, self.dilation, self.groups) RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [8, 1, 1, 48000]</p>
<p>I am getting this error while using the trainer.train()<br>
i am a bit new to this<br>
please help<br>
Thanks in advance</p>

username: ptrblck
cooked: <aside class="quote no-group" data-username="18bcs3399" data-post="1" data-topic="205635">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/18bcs3399/48/67288_2.png" class="avatar"> 18bcs3399:</div>
<blockquote>
<p>RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [8, 1, 1, 48000]</p>
</blockquote>
</aside>
<p>The input activation to an <code>nn.Conv1d</code> layer is wrong and contains an additional dimension.<br>
The inputs are supposed to have the shape <code>[batch_size, channels, seq_len]</code> or <code>[channels, seq_len]</code> for a single sample input.</p>