phybrain / efficientdensenet_crnn

memory efficient densenet+lstm+ctc实现中文识别
MIT License
31 stars 9 forks source link

expected FloatTensor but found cuda.FloatTensor #2

Open viig99 opened 6 years ago

viig99 commented 6 years ago

''' RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'source' '''

Got this error on line 407 of efficientdensenet_crnn/train/pytorch-train/models/efficient_densecrnn.py, can you please help ?

phybrain commented 6 years ago

can you provide more details? did you use model.cuda()

windowxiaoming commented 5 years ago

''' RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'source' '''

Got this error on line 407 of efficientdensenet_crnn/train/pytorch-train/models/efficient_densecrnn.py, can you please help ?

This code is based on pytorch=0.2.0,so the bug is appearance。So the author can modify the code so that it can run which the pytorch=0.4.0 or pytorch=0.4.1 ,Thanks

wjw-2017 commented 4 years ago

''' RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'source' ''' Got this error on line 407 of efficientdensenet_crnn/train/pytorch-train/models/efficient_densecrnn.py, can you please help ?

This code is based on pytorch=0.2.0,so the bug is appearance。So the author can modify the code so that it can run which the pytorch=0.4.0 or pytorch=0.4.1 ,Thanks

I also met this problem, have you solved it??? can you help me???