carpedm20 / carpedm20/DCGAN-tensorflow
NameError: name 'j' is not defined
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
D:\DCGAN-tensorflow-master\DCGAN-tensorflow-master>python main.py --dataset img --input_height=765 --output_height=765 --train
{'G_img_sum': ,
'batch_size': ,
'beta1': ,
'checkpoint_dir': ,
'ckpt_freq': ,
'crop': ,
'data_dir': ,
'dataset': ,
'epoch': ,
'export': ,
'freeze': ,
'h': ,
'help': ,
'helpfull': ,
'helpshort': ,
'input_fname_pattern': ,
'input_height': ,
'input_width': ,
'learning_rate': ,
'max_to_keep': ,
'out_dir': ,
'out_name': ,
'output_height': ,
'output_width': ,
'sample_dir': ,
'sample_freq': ,
'train': ,
'train_size': ,
'visualize': ,
'z_dim': ,
'z_dist': }
2019-09-18 06:15:20.855231: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
---------
Variables: name (type shape) [size]
---------
generator/g_h0_lin/Matrix:0 (float32_ref 100x1179648) [117964800, bytes: 471859200]
generator/g_h0_lin/bias:0 (float32_ref 1179648) [1179648, bytes: 4718592]
generator/g_bn0/beta:0 (float32_ref 512) [512, bytes: 2048]
generator/g_bn0/gamma:0 (float32_ref 512) [512, bytes: 2048]
generator/g_h1/w:0 (float32_ref 5x5x256x512) [3276800, bytes: 13107200]
generator/g_h1/biases:0 (float32_ref 256) [256, bytes: 1024]
generator/g_bn1/beta:0 (float32_ref 256) [256, bytes: 1024]
generator/g_bn1/gamma:0 (float32_ref 256) [256, bytes: 1024]
generator/g_h2/w:0 (float32_ref 5x5x128x256) [819200, bytes: 3276800]
generator/g_h2/biases:0 (float32_ref 128) [128, bytes: 512]
generator/g_bn2/beta:0 (float32_ref 128) [128, bytes: 512]
generator/g_bn2/gamma:0 (float32_ref 128) [128, bytes: 512]
generator/g_h3/w:0 (float32_ref 5x5x64x128) [204800, bytes: 819200]
generator/g_h3/biases:0 (float32_ref 64) [64, bytes: 256]
generator/g_bn3/beta:0 (float32_ref 64) [64, bytes: 256]
generator/g_bn3/gamma:0 (float32_ref 64) [64, bytes: 256]
generator/g_h4/w:0 (float32_ref 5x5x3x64) [4800, bytes: 19200]
generator/g_h4/biases:0 (float32_ref 3) [3, bytes: 12]
discriminator/d_h0_conv/w:0 (float32_ref 5x5x3x64) [4800, bytes: 19200]
discriminator/d_h0_conv/biases:0 (float32_ref 64) [64, bytes: 256]
discriminator/d_h1_conv/w:0 (float32_ref 5x5x64x128) [204800, bytes: 819200]
discriminator/d_h1_conv/biases:0 (float32_ref 128) [128, bytes: 512]
discriminator/d_bn1/beta:0 (float32_ref 128) [128, bytes: 512]
discriminator/d_bn1/gamma:0 (float32_ref 128) [128, bytes: 512]
discriminator/d_h2_conv/w:0 (float32_ref 5x5x128x256) [819200, bytes: 3276800]
discriminator/d_h2_conv/biases:0 (float32_ref 256) [256, bytes: 1024]
discriminator/d_bn2/beta:0 (float32_ref 256) [256, bytes: 1024]
discriminator/d_bn2/gamma:0 (float32_ref 256) [256, bytes: 1024]
discriminator/d_h3_conv/w:0 (float32_ref 5x5x256x512) [3276800, bytes: 13107200]
discriminator/d_h3_conv/biases:0 (float32_ref 512) [512, bytes: 2048]
discriminator/d_bn3/beta:0 (float32_ref 512) [512, bytes: 2048]
discriminator/d_bn3/gamma:0 (float32_ref 512) [512, bytes: 2048]
discriminator/d_h4_lin/Matrix:0 (float32_ref 1179648x1) [1179648, bytes: 4718592]
discriminator/d_h4_lin/bias:0 (float32_ref 1) [1, bytes: 4]
Total size of variables: 128940420
Total bytes of variables: 515761680
2019-09-18 06:15:22.676660: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:22.915099: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:23.269142: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:23.507608: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:23.898754: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:24.174286: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:24.174551: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:24.252897: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
2019-09-18 06:15:26.392673: W tensorflow/core/framework/allocator.cc:101] Allocation of 471859200 exceeds 10% of system memory.
Traceback (most recent call last):
File "main.py", line 147, in
tf.app.run()
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
_sys.exit(main(argv))
File "main.py", line 120, in main
dcgan.train(FLAGS)
File "D:\DCGAN-tensorflow-master\DCGAN-tensorflow-master\model.py", line 195, in train
grayscale=self.grayscale) for sample_file in sample_files]
File "D:\DCGAN-tensorflow-master\DCGAN-tensorflow-master\model.py", line 195, in
grayscale=self.grayscale) for sample_file in sample_files]
File "D:\DCGAN-tensorflow-master\DCGAN-tensorflow-master\utils.py", line 44, in get_image
resize_height, resize_width, crop)
File "D:\DCGAN-tensorflow-master\DCGAN-tensorflow-master\utils.py", line 104, in transform
im = Image.fromarray(image[j:j+crop_h, i:i+crop_w])
NameError: name 'j' is not defined
HI, can any body help me?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with utils.py, especially transform at line 104, then trace the call from model.py line 195 when running the command shown with main.py. Reproduce the training failure and verify that image transformation completes without the reported NameError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100