Open dangne opened 3 years ago
do you solve this problem? i meet the same issue.
When used torch 1.7.1, I meet this issue. I solved this issue by reducing the vision of torch.
According to this discussion, some autograd bugs exist in older versions which did not detect in-place operations that are not valid correctly.
After changing the in-place operations below, the code works fine for me when running RNN model and torch 1.8.0.
https://github.com/carpedm20/ENAS-pytorch/blob/master/models/shared_rnn.py#L248
clipped_num += 1
to clipped_num = clipped_num + 1
and
hidden *= torch.autograd.Variable(torch.FloatTensor(mask).cuda(), requires_grad=False)
to
hidden = hidden * torch.autograd.Variable(torch.FloatTensor(mask).cuda(), requires_grad=False)
I encountered this strange error. Here is the output