Universal-Transformer-Pytorch icon indicating copy to clipboard operation
Universal-Transformer-Pytorch copied to clipboard

Execution without cuda throws error

Open bvanaken opened this issue 6 years ago • 1 comments

Hi, when running the script on a machine without cuda support, I'm getting the following error:

File ".../Universal-Transformer-Pytorch/models/UTransformer.py", line 236, in forward halting_probability = torch.zeros(inputs.shape[0],inputs.shape[1]).cuda() RuntimeError: torch.cuda.FloatTensor is not enabled.

I suppose the lines 236 - 242 in UTransformer.py require an additional cuda-check.

bvanaken avatar Jan 16 '19 12:01 bvanaken

Hi,

you are right, this should be fixed.

Thanks

andreamad8 avatar Jan 16 '19 13:01 andreamad8