-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: cuda() got an unexpected keyword argument 'device_id' #26
Comments
when I made a change in network.py ,as following: Errors are like this: So I really dont't know how to run this code properly on Windows 10 X64 with cuda 8.0,cudnn6, python 3.6.1,torch0.3.0 after many times' attempts |
Hello, |
NVIDIA Geforce GT 750M. It's not so good,but i just want to have a try.Do you mean that this cuda version does not support my GPU? |
I met the same problem ,have you solved this? |
In base_model.py and models.py : change from " device_id" to "device" |
To: hust-lidelong ,It can solve the first problem,but the second error occured! |
I just modified the code in networks.py ,netG.cuda(device_id=gpu_ids[0])-->netG.cuda(gpu_ids[0]) |
To magnificGH : It still doesn't work now! |
how about now ?It still exiting? |
#11 JUST DO,NO THANKS |
When I run train.py in command line,I meet this problem. What shold I do?
(E:\programs\Anaconda\envs\python) D:\cv2\DeblurGAN-master>python train.py --dataroot blurred_sharp/ --continue_train
------------ Options -------------
batchSize: 1
beta1: 0.5
checkpoints_dir: ./checkpoints
continue_train: True
dataroot: blurred_sharp/
dataset_mode: aligned
display_freq: 100
display_id: 1
display_port: 8097
display_single_pane_ncols: 0
display_winsize: 256
epoch_count: 1
fineSize: 256
gan_type: wgan-gp
gpu_ids: [0]
identity: 0.0
input_nc: 3
isTrain: True
lambda_A: 100.0
lambda_B: 10.0
learn_residual: False
loadSizeX: 640
loadSizeY: 360
lr: 0.0001
max_dataset_size: inf
model: content_gan
nThreads: 2
n_layers_D: 3
name: experiment_name
ndf: 64
ngf: 64
niter: 150
niter_decay: 150
no_dropout: False
no_flip: False
no_html: False
norm: instance
output_nc: 3
phase: train
pool_size: 50
print_freq: 100
resize_or_crop: resize_and_crop
save_epoch_freq: 5
save_latest_freq: 5000
serial_batches: False
which_direction: AtoB
which_epoch: latest
which_model_netD: basic
which_model_netG: resnet_9blocks
-------------- End ----------------
CustomDatasetDataLoader
dataset [AlignedDataset] was created
Traceback (most recent call last):
File "train.py", line 56, in
model = create_model(opt)
File "D:\cv2\DeblurGAN-master\models\models.py", line 11, in create_model
model.initialize(opt)
File "D:\cv2\DeblurGAN-master\models\conditional_gan_model.py", line 34, in initialize
opt.which_model_netG, opt.norm, not opt.no_dropout, self.gpu_ids, use_parallel, opt.learn_residual)
File "D:\cv2\DeblurGAN-master\models\networks.py", line 52, in define_G
netG.cuda(device_id=gpu_ids[0])
TypeError: cuda() got an unexpected keyword argument 'device_id'
The text was updated successfully, but these errors were encountered: