Which verson of Tensorflow is required for CoGAN-tensorflow?
kaihuchen opened this issue · 3 comments
kaihuchen commented
Which verson of Tensorflow is required for CoGAN-tensorflow? I tried it on v0.12.1 and got the following error:
$ python main.py --is_train True --dataset mnist I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally {'batch_size': 128, 'beta1': 0.5, 'c_dim': 3, 'checkpoint_dir': 'checkpoint', 'dataset': 'mnist', 'epoch': 25, 'is_crop': False, 'is_train': True, 'learning_rate': 0.0002, 'output_size': 64, 'sample_dir': 'samples', 'train_size': inf, 'visualize': False} I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: GRID K520 major: 3 minor: 0 memoryClockRate (GHz) 0.797 pciBusID 0000:00:03.0 Total memory: 3.94GiB Free memory: 3.91GiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GRID K520, pci bus id: 0000:00:03.0) WARNING:tensorflow:From /mnt/ml/tests/CoGAN-tensorflow/model.py:87 in build_model.: histogram_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30. Instructions for updating: Please switch to tf.summary.histogram. Note that tf.summary.histogram uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on their scope. Traceback (most recent call last): File "main.py", line 51, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "main.py", line 41, in main dataset_name=FLAGS.dataset, is_crop=FLAGS.is_crop, checkpoint_dir=FLAGS.checkpoint_dir) File "/mnt/ml/tests/CoGAN-tensorflow/model.py", line 68, in __init__ self.build_model() File "/mnt/ml/tests/CoGAN-tensorflow/model.py", line 96, in build_model self.G2 = self.generator(self.z, self.y, share_params=True, reuse=False, name='G2') File "/mnt/ml/tests/CoGAN-tensorflow/model.py", line 309, in generator h0 = prelu(self.g_bn0(linear(z, self.gfc_dim, 'g_h0_lin', reuse=share_params), reuse=share_params), File "/mnt/ml/tests/CoGAN-tensorflow/ops.py", line 37, in __call__ ema_apply_op = self.ema.apply([batch_mean, batch_var]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 391, in apply self._averages[var], var, decay, zero_debias=zero_debias)) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 70, in assign_moving_average update_delta = _zero_debias(variable, value, decay) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 177, in _zero_debias trainable=False) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable validate_shape=validate_shape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter caching_device=caching_device, validate_shape=validate_shape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 650, in _get_single_variable "VarScope?" % name) ValueError: Variable g_bn0/g_bn0_2/g_bn0_2/moments_1/moments_1/mean/ExponentialMovingAverage/biased does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?
andrewliao11 commented
I used tf.0.10 when i implement this project, and all work smoothly.
If you're using version later than tf.0.11, this tf bugs show up, see tensorflow/issue
I'm trying to fix it for version later than tf.0.11, thx!
andrewliao11 commented
plz check it out the newest commit!
btw, your academic blogs looks quite nice 😄
kaihuchen commented
Thanks for the quick fix! It runs smoothly without the error now.
Glad that you enjoy my blog. If you have any input please feel free to let me know.