Skip to content
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

Run on CPU insted of GPU #16

Closed
amirzenoozi opened this issue Dec 6, 2020 · 3 comments
Closed

Run on CPU insted of GPU #16

amirzenoozi opened this issue Dec 6, 2020 · 3 comments

Comments

@amirzenoozi
Copy link

amirzenoozi commented Dec 6, 2020

Hi,
I Try To run this Project But I have little problem and when I try to start train phase this code is just only run on cpu but I install cudatoolkit and tensorflow-gpu. can u help me ?

2020-12-06 18:00:45.278352: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA     [693/1792]
2020-12-06 18:00:45.302721: E tensorflow/stream_executor/cuda/cuda_driver.cc:397] failed call to cuInit: CUDA_ERROR_NO_DEVICE                                                              
2020-12-06 18:00:45.302766: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: host-name
2020-12-06 18:00:45.302775: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: host-name
2020-12-06 18:00:45.302816: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 450.66.0
2020-12-06 18:00:45.302853: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: 450.66.0                                                                 2020-12-06 18:00:45.302863: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:300] kernel version seems to match DSO: 450.66.0

npy file loaded -------  vgg19_weight/vgg19.npy
##### Information #####
# gan type :  lsgan
# light :  False
# dataset :  Hayao
# max dataset number :  6656
# batch_size :  12
# epoch :  101
# init_epoch :  10
# training image size [H, W] :  [256, 256]
# g_adv_weight,d_adv_weight,con_weight,sty_weight,color_weight,tv_weight :  300.0 300.0 1.5 2.5 10.0 1.0
# init_lr,g_lr,d_lr :  0.0002 2e-05 4e-05
# training_rate G -- D: 1 : 1
build model finished: 0.138872s
build model finished: 0.130571s
build model finished: 0.120662s
build model finished: 0.127711s
build model finished: 0.123440s
G:
---------
Variables: name (type shape) [size]
---------
generator/G_MODEL/A/Conv/weights:0 (float32_ref 7x7x3x32) [4704, bytes: 18816]
generator/G_MODEL/A/LayerNorm/beta:0 (float32_ref 32) [32, bytes: 128]
generator/G_MODEL/A/LayerNorm/gamma:0 (float32_ref 32) [32, bytes: 128]
generator/G_MODEL/A/Conv_1/weights:0 (float32_ref 3x3x32x64) [18432, bytes: 73728]
generator/G_MODEL/A/LayerNorm_1/beta:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/A/LayerNorm_1/gamma:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/A/Conv_2/weights:0 (float32_ref 3x3x64x64) [36864, bytes: 147456]
generator/G_MODEL/A/LayerNorm_2/beta:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/A/LayerNorm_2/gamma:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/B/Conv/weights:0 (float32_ref 3x3x64x128) [73728, bytes: 294912]
generator/G_MODEL/B/LayerNorm/beta:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/B/LayerNorm/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/B/Conv_1/weights:0 (float32_ref 3x3x128x128) [147456, bytes: 589824]
generator/G_MODEL/B/LayerNorm_1/beta:0 (float32_ref 128) [128, bytes: 512]                                                                                                        [649/1792]generator/G_MODEL/B/LayerNorm_1/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/C/Conv/weights:0 (float32_ref 3x3x128x128) [147456, bytes: 589824]
generator/G_MODEL/C/LayerNorm/beta:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/C/LayerNorm/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/C/r1/Conv/weights:0 (float32_ref 1x1x128x256) [32768, bytes: 131072]
generator/G_MODEL/C/r1/LayerNorm/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r1/LayerNorm/gamma:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r1/r1/w:0 (float32_ref 3x3x256x1) [2304, bytes: 9216]
generator/G_MODEL/C/r1/r1/bias:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r1/1/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r1/1/gamma:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r1/Conv_1/weights:0 (float32_ref 1x1x256x256) [65536, bytes: 262144]
generator/G_MODEL/C/r1/2/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r1/2/gamma:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r2/Conv/weights:0 (float32_ref 1x1x256x512) [131072, bytes: 524288]
generator/G_MODEL/C/r2/LayerNorm/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r2/LayerNorm/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r2/r2/w:0 (float32_ref 3x3x512x1) [4608, bytes: 18432]
generator/G_MODEL/C/r2/r2/bias:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r2/1/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r2/1/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r2/Conv_1/weights:0 (float32_ref 1x1x512x256) [131072, bytes: 524288]
generator/G_MODEL/C/r2/2/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r2/2/gamma:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r3/Conv/weights:0 (float32_ref 1x1x256x512) [131072, bytes: 524288]
generator/G_MODEL/C/r3/LayerNorm/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r3/LayerNorm/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r3/r3/w:0 (float32_ref 3x3x512x1) [4608, bytes: 18432]
generator/G_MODEL/C/r3/r3/bias:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r3/1/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r3/1/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r3/Conv_1/weights:0 (float32_ref 1x1x512x256) [131072, bytes: 524288]
generator/G_MODEL/C/r3/2/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r3/2/gamma:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r4/Conv/weights:0 (float32_ref 1x1x256x512) [131072, bytes: 524288]
generator/G_MODEL/C/r4/LayerNorm/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r4/LayerNorm/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r4/r4/w:0 (float32_ref 3x3x512x1) [4608, bytes: 18432]
generator/G_MODEL/C/r4/r4/bias:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r4/1/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r4/1/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/G_MODEL/C/r4/Conv_1/weights:0 (float32_ref 1x1x512x256) [131072, bytes: 524288]
generator/G_MODEL/C/r4/2/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/G_MODEL/C/r4/2/gamma:0 (float32_ref 256) [256, bytes: 1024]                                                                                                             [605/1792]generator/G_MODEL/C/Conv_1/weights:0 (float32_ref 3x3x256x128) [294912, bytes: 1179648]
generator/G_MODEL/C/LayerNorm_1/beta:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/C/LayerNorm_1/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/D/Conv/weights:0 (float32_ref 3x3x128x128) [147456, bytes: 589824]
generator/G_MODEL/D/LayerNorm/beta:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/D/LayerNorm/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/D/Conv_1/weights:0 (float32_ref 3x3x128x128) [147456, bytes: 589824]
generator/G_MODEL/D/LayerNorm_1/beta:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/D/LayerNorm_1/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/G_MODEL/E/Conv/weights:0 (float32_ref 3x3x128x64) [73728, bytes: 294912]
generator/G_MODEL/E/LayerNorm/beta:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/E/LayerNorm/gamma:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/E/Conv_1/weights:0 (float32_ref 3x3x64x64) [36864, bytes: 147456]
generator/G_MODEL/E/LayerNorm_1/beta:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/E/LayerNorm_1/gamma:0 (float32_ref 64) [64, bytes: 256]
generator/G_MODEL/E/Conv_2/weights:0 (float32_ref 7x7x64x32) [100352, bytes: 401408]
generator/G_MODEL/E/LayerNorm_2/beta:0 (float32_ref 32) [32, bytes: 128]
generator/G_MODEL/E/LayerNorm_2/gamma:0 (float32_ref 32) [32, bytes: 128]
generator/G_MODEL/out_layer/Conv/weights:0 (float32_ref 1x1x32x3) [96, bytes: 384]
Total size of variables: 2143552
Total bytes of variables: 8574208
 [*] Reading checkpoints...
 [*] Failed to find a checkpoint
 [!] Load failed...
Epoch:   0 Step:     0 /   554  time: 80.342747 s init_v_loss: 592.22143555  mean_v_loss: 592.22143555
@TachibanaYoshino
Copy link
Owner

please check the gpu setting, that is the code os.environ CUDA_VISIBLE_DEVICES='0'

1 similar comment
@TachibanaYoshino
Copy link
Owner

please check the gpu setting, that is the code os.environ CUDA_VISIBLE_DEVICES='0'

@amirzenoozi
Copy link
Author

Thank You So Much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants