1ytic / pytorch-edit-distance

Levenshtein edit-distance on PyTorch and CUDA
MIT License
94 stars 14 forks source link

bug or cofusion about the AverageCER meter. #5

Closed songtaoshi closed 4 years ago

songtaoshi commented 4 years ago

hi 1ytic, image image

Actually, I have successfully run the AverageCER in your e2e ctc training. But I have met a problem. It seems that the self.data initial is zero cannot be added to the cuda tensor, but I have tried 0+cuda_tensor

1ytic commented 4 years ago

If I remember correctly, this happens when the local CUDA version does not match with torch. Try to install torch-edit-distance in the system with CUDA version equal to torch CUDA.

songtaoshi commented 4 years ago

image

Hi, still meets problem. maybe it can only be used to CUDA 10.0 or are there any setting I need to check?

1ytic commented 4 years ago

Did you rebuild the package with pip --no-cache-dir ? If this does not help, please try to manually replace all AT_DISPATCH_ALL_TYPES with AT_DISPATCH_INTEGRAL_TYPES in the file edit-distance.cu and rebuild the package locally.

songtaoshi commented 4 years ago

image pip install no cache tried but still have problem and I have not tried yet edit the type in .cu file.

songtaoshi commented 4 years ago

and also tried replacing all the AT_DISPATCH_ALL_TYPES with AT_DISPATCH_INTEGRAL_TYPES, and rebuild with python setup.py install but it still not works

1ytic commented 4 years ago

Did you run python -m torch_edit_distance.test?

songtaoshi commented 4 years ago

The result: image

1ytic commented 4 years ago

It is definitely something bad with CUDA. Try reinstalling everything in an isolated environment :(