AkojimaSLP / Monotonic-Chunkwise-Attention-MoChA-

3 stars 2 forks source link

Getting Expected !pre_compute_input to be true, but got false. #1

Open GGzhangBOY opened 4 years ago

GGzhangBOY commented 4 years ago

I'm just transfer from tensorflow to pytorch, the module works perfectly fine when I ran on CPU, but I got the exception when I ran on GPU. Here is the stack: RuntimeError Expected !pre_compute_input to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.) File "J:\MoChA-pytorch-master\mocha_train.py", line 194, in forward h, (hy, cy) = self.bi_lstm(x) File "J:\MoChA-pytorch-master\mocha_train.py", line 208, in forward h = self.encoder(speech, lengths_enc) File "J:\MoChA-pytorch-master\mocha_train.py", line 256, in mocha_predict, ctc_predict = model(x, len_x, y)

Thanks for your reply :D

AkojimaSLP commented 4 years ago

Hi @GGzhangBOY

Thanks for using my code.

I fixed my code. Could you try it on GPU ?

Regards,

GGzhangBOY commented 4 years ago

Thank you for your kindly reply! The code works on GPU right now, I guess I need to study pytorch from scratch :D