fsdl-text-recognizer-2021-labs
fsdl-text-recognizer-2021-labs copied to clipboard
Lab3 ctc loss causes Error
When running Lab 3 commands from the readme that use ctc loss, this error it thrown
preds = torch.nn.functional.softmax(preds, dim=-1)
File "/home/xxx/anaconda3/envs/fsdl/lib/python3.6/site-packages/torch/nn/functional.py", line 1512, in softmax
ret = input.softmax(dim)
RuntimeError: "host_softmax" not implemented for 'Int'
This is due to the previous fix of the accuracy problem. The decoded content cannot be passed to the Accuracy-Metric Hack, the original Accuracy from pl.metrics should be used instead.
Same error.
I put .float()
after preds and it worked just fine.
I put
.float()
after preds and it worked just fine.
Still not working. Invoking error:
ValueError: If `preds` and `target` are of shape (N, ...) and `preds` are floats, `target` should be binary.
Solving this issue by commenting out the run around predictions method #34