darts icon indicating copy to clipboard operation
darts copied to clipboard

one of the variables needed for gradient computation has been modified by an inplace operation

Open pawopawo opened this issue 5 years ago • 2 comments

train_acc, train_obj = train(train_queue, model, criterion, optimizer) File "train.py", line 136, in train loss.backward() File "/usr/local/lib/python3.6/site-packages/torch/tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/usr/local/lib/python3.6/site-packages/torch/autograd/init.py", line 90, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

pawopawo avatar Aug 10 '19 08:08 pawopawo

Hi, @quark0 I meet the same problem. The inplace parameter of each layer in my model is set to false. Could u give me some suggestion for solving this issue. Thx~

wutianyiRosun avatar Sep 09 '19 03:09 wutianyiRosun

Hi, @xxsgcjwddsg , have u solved this issue?

wutianyiRosun avatar Sep 09 '19 03:09 wutianyiRosun