OpenTag_2019
OpenTag_2019 copied to clipboard
Version or IndexError
Hello and thank you for sharing your code. I am trying to understand better the OpenTag implementation and am getting the below error; Traceback (most recent call last): File "C:\Project\OpenTag_2019\env\lib\site-packages\fire\core.py", line 471, in _Fire target=component.name) File "C:\Project\OpenTag_2019\env\lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "C:/Project/OpenTag_2019/main.py", line 76, in train loss = model.log_likelihood(inputs) File "C:\Project\OpenTag_2019\models\OpenTag_2019.py", line 102, in log_likelihood return - self.crf(outputs, target) File "C:\Project\OpenTag_2019\env\lib\site-packages\torch\nn\modules\module.py", line 1110, in call_impl return forward_call(*input, **kwargs) File "C:\Project\OpenTag_2019\env\lib\site-packages\torchcrf_init.py", line 102, in forward numerator = self.compute_score(emissions, tags, mask) File "C:\Project\OpenTag_2019\env\lib\site-packages\torchcrf_init.py", line 186, in _compute_score score = self.start_transitions[tags[0]] IndexError: tensors used as indices must be long, byte, or bool tensors
I am not sure if this is a result of a version issue. Can you advise the versions for the requirements you make reference to?
The above is produced when running the code using main.py train --batch_size=128
Thank you in advance.