Error when running code
with torch.no_grad():
logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
Gives this error
RuntimeError Traceback (most recent call last)
in
1 with torch.no_grad():
----> 2 logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
10 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py in _conv_forward(self, input, weight, bias)
302 _single(0), self.dilation, self.groups)
303 return F.conv1d(input, weight, bias, self.stride,
--> 304 self.padding, self.dilation, self.groups)
305
306 def forward(self, input: Tensor) -> Tensor:
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [1, 1, 111177, 2]