lcy0604 / erasenet Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Thanks for your work, there may be a bug in dataloader.py, where all_input may be all_img in this line.
Getting below error under pytorch version >1.4 . but it's good at pytorch 1.4.
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [1, 512, 4, 4]] is at version 2; expected version 1 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
tried to found and solve all inplace operation I can locate, but CANNOT get around still. Any ideas?
pytorch 1.13.1
cuda11.6
Traceback (most recent call last):
File "/EraseNet/train_STE.py", line 109, in
G_loss.backward()
File /.conda/envs/paddle_env/lib/python3.9/site-packages/torch/_tensor.py", line 488, in backward
torch.autograd.backward(
File ".conda/envs/paddle_env/lib/python3.9/site-packages/torch/autograd/init.py", line 197, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [1, 512, 4, 4]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Has anyone encountered such a mistake? When I replace a single GPU with multiple GPUs, I can't run.
THCudaCheck FAIL file=/tmp/pip-req-build-4baxydiv/aten/src/THCUNN/generic/LeakyReLU.cu line=56 error=77 : an illegal memory access was encountered
Traceback (most recent call last):
File "/lustre/home/phe/windows_pycharmProjects/EraseNet-master/train_STE.py", line 106, in
G_loss = criterion(imgs, masks, x_o1, x_o2, x_o3, fake_images, mm, gt, count, i)
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in parallel_apply
output.reraise()
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise
raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker
output = module(*input, **kwargs)
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/lustre/home/phe/windows_pycharmProjects/EraseNet-master/loss/Loss.py", line 60, in forward
D_loss.backward(retain_graph=True)
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/tensor.py", line 166, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/lustre/home/phe/miniconda3/envs/erasenet/lib/python3.7/site-packages/torch/autograd/init.py", line 99, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: CUDA error: an illegal memory access was encountered
Hi,thank u for your wonderful work and the open source code. do u have the plan to provide the pretrain model?
Any one met the same problem?
warnings.warn('Was asked to gather along dimension 0, but all ' Traceback (most recent call last): File "train_STE.py", line 109, in <module> G_loss.backward() File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/tensor.py", line 245, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs) File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/autograd/__init__.py", line 147, in backward allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 512, 4, 4]], which is output 38 of BroadcastBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Can you provide a pre-trained model?Thanks~
thank you for your dataset!I found that there is "all_gts" in the dataset, but there is no "Mask" folder. How can I convert .txt files in "all_gts" into .jpg images in “mask”.
hey, thank you for your dataset! I can't fount text localization masks or annotations, can you provide the corresponding labels? Thanks~
Hi, may I ask how many images do you use and how long will it cost for finish the training?
Anyone met the same problem?
Traceback (most recent call last): File "train_STE.py", line 105, in <module> x_o1,x_o2,x_o3,fake_images,mm = netG(imgs) File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 167, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 177, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply output.reraise() File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise raise self.exc_type(msg) RuntimeError: Caught RuntimeError in replica 0 on device 0. Original Traceback (most recent call last): File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker output = module(*input, **kwargs) File "/data1/xing_zhao/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/DeepLearning/xing_zhao/inpainting/EraseNet-master/models/sa_gan.py", line 203, in forward x = torch.cat([self.lateral_connection3(con_x2), x], dim=1) RuntimeError: Sizes of tensors must match except in dimension 2. Got 32 and 31 (The offending index is 0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.