AttributeError: 'DCGAN' object has no attribute 'g_bn0
markeroon opened this issue · comments
Mark B commented
When I specify --visualize True
as an arg, I get the following
I tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:116] successfully opened CUDA library libcurand.so.8.0 locally
{'batch_size': 64,
'beta1': 0.5,
'checkpoint_dir': 'checkpoint',
'dataset': 'celebC',
'epoch': 2,
'image_size': 400,
'is_crop': True,
'is_train': True,
'learning_rate': 0.0002,
'sample_dir': 'samples',
'train_size': inf,
'visualize': True}
I tensorflow/core/common_runtime/gpu/gpu_device.cc:951] Found device 0 with properties:
name: TITAN X (Pascal)
major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:01:00.0
Total memory: 11.90GiB
Free memory: 11.35GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:972] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:01:00.0)
[*] Reading checkpoints...
[*] Load SUCCESS
Epoch: [ 0] [ 0/ 3] time: 3.6289, g_loss: 0.38425747
WARNING:tensorflow:*******************************************************
WARNING:tensorflow:TensorFlow's V1 checkpoint format is deprecated; V2 will become the default shortly after 10/31/2016.
WARNING:tensorflow:Consider switching to the more efficient V2 format now:
WARNING:tensorflow: `tf.train.Saver(write_version=tf.train.SaverDef.V2)`
WARNING:tensorflow:to prevent breakage.
WARNING:tensorflow:*******************************************************
Epoch: [ 0] [ 1/ 3] time: 8.5043, g_loss: 0.34239292
Epoch: [ 0] [ 2/ 3] time: 10.3694, g_loss: 0.28749919
Epoch: [ 1] [ 0/ 3] time: 12.3451, g_loss: 0.35043076
Epoch: [ 1] [ 1/ 3] time: 14.3204, g_loss: 0.29150483
Epoch: [ 1] [ 2/ 3] time: 16.3195, g_loss: 0.23925565
Traceback (most recent call last):
File "main.py", line 60, in <module>
tf.app.run()
File "/home/markb/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "main.py", line 49, in main
to_json("./web/js/layers.js", [dcgan.h0_w, dcgan.h0_b, dcgan.g_bn0],
AttributeError: 'DCGAN' object has no attribute 'g_bn0'
Further, when I disable this call in hopes of getting sampler images to save, I get the following
Traceback (most recent call last):
File "main.py", line 60, in <module>
tf.app.run()
File "/home/markb/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "main.py", line 57, in main
visualize(sess, dcgan, FLAGS, OPTION)
File "/home/markb/Dev/subpixel/utils.py", line 148, in visualize
if option == 0:
AttributeError: 'DCGAN' object has no attribute 'sampler'
I can't find any mention of the dcgan's sampler in the code. Is there an easy way of fixing this?
Thanks!
Mark
kitterive commented
I met this error ,too.