Limitations on input image size
- Vorherrschende Sprache
- Python
- Sterne
- 84
- Forks
- 29
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi, I tried loading a few scores (png and pdf), but I got the error message below.
I managed to make the model work with a much smaller score, as I read in an other issue that exists a maximum amount of allowed pixels per each dimension. If there is no solution yet, I'll leave it as an issue.
> predictions, _ = model.predict(convert_img_to_tensor(image).unsqueeze(0).to(device),
> File "site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
> return func(*args, **kwargs)
> File "smt_model/modeling_smt.py", line 406, in predict
> output = self.forward_decoder(encoder_output=encoder_output, last_predictions=predicted_sequence,
> File "smt_model/modeling_smt.py", line 372, in forward_decoder
> encoder_output_2D = self.pos2D(encoder_output)
> File "site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
> return self._call_impl(*args, **kwargs)
> File "site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
> return forward_call(*args, **kwargs)
> File "smt_model/modeling_smt.py", line 41, in forward
> return x + self.get_pe_by_size(x.size(-2), x.size(-1))
> RuntimeError: The size of tensor a (263) must match the size of tensor b (16) at non-singleton dimension 2
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.