Skip to content

RuntimeError when training image-wise network #10

@CaelynCheung1996

Description

@CaelynCheung1996

I encountered this problem when running in mode "0" to train image-wise network after done training patch-wise one.
Traceback (most recent call last):
File "train.py", line 18, in
iw_model.train()
File "/home/xiaohui8/SR/ICIAR2018/src/models.py", line 300, in train
loss.backward()
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/site-packages/torch/tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xiaohui8/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.5/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions