Comments (8)
Set gpu_ids
as -1
to run in cpu
.
Line 17 in 5a2c872
if gpu_ids
is not set to -1
, model
will be wrapped in DataParallel
Line 18 in 5a2c872
when its wrapped in DataParallel
, everything in model
can be only access like model.module.something
Hope this helped.
from pix2pixhd.
You can remove all instances of ".module" in train.py if commenting in models.py if opt.isTrain and len(opt.gpu_ids) and not opt.fp16: model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids)
from pix2pixhd.
Which line in which file does this occur?
from pix2pixhd.
I couldn’t find a module
in model
. Could you point me to the code section where its defined.
AttributeError: 'model' object has no attribute 'module'
from pix2pixhd.
When I use cpu only without GPU
create web directory ./checkpoints/melody/web...
Traceback (most recent call last):
File "train.py", line 48, in
optimizer_G, optimizer_D = model.module.optimizer_G, model.module.optimizer_D
File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 772, in getattr
type(self).name, name))
torch.nn.modules.module.ModuleAttributeError: 'Pix2PixHDModel' object has no attribute 'module'
from pix2pixhd.
I am also facing the error, any solution for this?
from pix2pixhd.
Any chance you are trying to run it using PyTorch >= 1.0 and on cpu? Try PyTorch 1.5/1.6 and a GPU
from pix2pixhd.
i also need solution @joel1895
from pix2pixhd.
Related Issues (20)
- wrong output when testing with RGB segmentation mask HOT 1
- I trained so poorly? HOT 5
- RuntimeError: CUDA out of memory,continuous training? HOT 5
- Low performance compared to pix2pix
- Errors during testing
- ./checkpoints/label2city_1024p_feat/latest_net_E.pth not exists yet!
- The test results were not good
- module 'torch._C' has no attribute '_cuda_setDevice' HOT 1
- Regarding High Dynamic Range Images HOT 1
- Regarding the inclusion of classification criteria during training.
- The training effect is good, but the test effect is poor. HOT 2
- Hello, I only care yellow color loss, how to improve my loss function
- How does layer-wise feature matching help with discriminator and GAN training objective?
- .
- Guidance Needed for Selecting Best Epoch/Weights in Pix2PixHD Training
- Update code for new version of python
- How to solve the RuntimeError: data set to a tensor that requires gradients must be floating point or complex dtype
- not work in python 3.10
- Edge2face experiment with CelebA-HQ
- Issues with Running stylegan2_pytorch in gpu settings on colab notebook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pix2pixhd.