{"action":"created","issue":{"url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6","repository_url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN","labels_url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6/comments","events_url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6/events","html_url":"https://github.com/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6","id":236104397,"number":6,"title":"apply_gradients doesn't work","user":{"login":"gildorgood","id":28227991,"avatar_url":"https://avatars0.githubusercontent.com/u/28227991?v=3","gravatar_id":"","url":"https://api.github.com/users/gildorgood","html_url":"https://github.com/gildorgood","followers_url":"https://api.github.com/users/gildorgood/followers","following_url":"https://api.github.com/users/gildorgood/following{/other_user}","gists_url":"https://api.github.com/users/gildorgood/gists{/gist_id}","starred_url":"https://api.github.com/users/gildorgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gildorgood/subscriptions","organizations_url":"https://api.github.com/users/gildorgood/orgs","repos_url":"https://api.github.com/users/gildorgood/repos","events_url":"https://api.github.com/users/gildorgood/events{/privacy}","received_events_url":"https://api.github.com/users/gildorgood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-15T07:46:54Z","updated_at":"2017-06-21T11:18:46Z","closed_at":null,"body":"Hi,\r\n\r\nI am interested in your work, so I download your code and try to run it.\r\nBut, some errors occur at \"apply_gradients\". \r\n\r\nI'm working on this problem a little while, but I cannot fix the error.\r\n\r\nHere are the error message.\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-50-b44d47b3f0a2> in <module>()\r\n      6 \r\n      7     # apply the gradients with our optimizers\r\n----> 8     train_E = opt_E.apply_gradients(grads_e, global_step=global_step)\r\n      9     train_G = opt_G.apply_gradients(grads_g, global_step=global_step)\r\n     10     train_D = opt_D.apply_gradients(grads_d, global_step=global_step)\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py in apply_gradients(self, grads_and_vars, global_step, name)\r\n    444                        ([str(v) for _, _, v in converted_grads_and_vars],))\r\n    445     with ops.control_dependencies(None):\r\n--> 446       self._create_slots([_get_variable_for(v) for v in var_list])\r\n    447     update_ops = []\r\n    448     with ops.name_scope(name, self._name) as name:\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/adam.py in _create_slots(self, var_list)\r\n    120     # Create slots for the first and second moments.\r\n    121     for v in var_list:\r\n--> 122       self._zeros_slot(v, \"m\", self._name)\r\n    123       self._zeros_slot(v, \"v\", self._name)\r\n    124 \r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py in _zeros_slot(self, var, slot_name, op_name)\r\n    764     named_slots = self._slot_dict(slot_name)\r\n    765     if _var_key(var) not in named_slots:\r\n--> 766       named_slots[_var_key(var)] = slot_creator.create_zeros_slot(var, op_name)\r\n    767     return named_slots[_var_key(var)]\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/slot_creator.py in create_zeros_slot(primary, name, dtype, colocate_with_primary)\r\n    172     return create_slot_with_initializer(\r\n    173         primary, initializer, slot_shape, dtype, name,\r\n--> 174         colocate_with_primary=colocate_with_primary)\r\n    175   else:\r\n    176     val = array_ops.zeros(slot_shape, dtype=dtype)\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/slot_creator.py in create_slot_with_initializer(primary, initializer, shape, dtype, name, colocate_with_primary)\r\n    144       with ops.colocate_with(primary):\r\n    145         return _create_slot_var(primary, initializer, \"\", validate_shape, shape,\r\n--> 146                                 dtype)\r\n    147     else:\r\n    148       return _create_slot_var(primary, initializer, \"\", validate_shape, shape,\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/slot_creator.py in _create_slot_var(primary, val, scope, validate_shape, shape, dtype)\r\n     64       use_resource=_is_resource(primary),\r\n     65       shape=shape, dtype=dtype,\r\n---> 66       validate_shape=validate_shape)\r\n     67   variable_scope.get_variable_scope().set_partitioner(current_partitioner)\r\n     68 \r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py in get_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter)\r\n   1047       collections=collections, caching_device=caching_device,\r\n   1048       partitioner=partitioner, validate_shape=validate_shape,\r\n-> 1049       use_resource=use_resource, custom_getter=custom_getter)\r\n   1050 get_variable_or_local_docstring = (\r\n   1051     \"\"\"%s\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py in get_variable(self, var_store, name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter)\r\n    946           collections=collections, caching_device=caching_device,\r\n    947           partitioner=partitioner, validate_shape=validate_shape,\r\n--> 948           use_resource=use_resource, custom_getter=custom_getter)\r\n    949 \r\n    950   def _get_partitioned_variable(self,\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py in get_variable(self, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter)\r\n    354           reuse=reuse, trainable=trainable, collections=collections,\r\n    355           caching_device=caching_device, partitioner=partitioner,\r\n--> 356           validate_shape=validate_shape, use_resource=use_resource)\r\n    357 \r\n    358   def _get_partitioned_variable(\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py in _true_getter(name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource)\r\n    339           trainable=trainable, collections=collections,\r\n    340           caching_device=caching_device, validate_shape=validate_shape,\r\n--> 341           use_resource=use_resource)\r\n    342 \r\n    343     if custom_getter is not None:\r\n\r\n/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py in _get_single_variable(self, name, shape, dtype, initializer, regularizer, partition_info, reuse, trainable, collections, caching_device, validate_shape, use_resource)\r\n    669       raise ValueError(\"Variable %s does not exist, or was not created with \"\r\n    670                        \"tf.get_variable(). Did you mean to set reuse=None in \"\r\n--> 671                        \"VarScope?\" % name)\r\n    672     if not shape.is_fully_defined() and not initializing_from_value:\r\n    673       raise ValueError(\"Shape of a new variable (%s) must be fully defined, \"\r\n\r\nValueError: Variable enc/conv2d/weights/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?\r\n---------------------------------------------------------------------------\r\n\r\nDo you have any idea on this error?\r\n\r\n\r\nI'm sorry for my bad English.\r\n\r\n\r\n\r\nps. I use TensorFlow version r1.1 prettytensor version 0.7.4 and python 3.6."},"comment":{"url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/comments/310047893","html_url":"https://github.com/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6#issuecomment-310047893","issue_url":"https://api.github.com/repos/timsainb/Tensorflow-MultiGPU-VAE-GAN/issues/6","id":310047893,"user":{"login":"Engineering-Course","id":7713394,"avatar_url":"https://avatars3.githubusercontent.com/u/7713394?v=3","gravatar_id":"","url":"https://api.github.com/users/Engineering-Course","html_url":"https://github.com/Engineering-Course","followers_url":"https://api.github.com/users/Engineering-Course/followers","following_url":"https://api.github.com/users/Engineering-Course/following{/other_user}","gists_url":"https://api.github.com/users/Engineering-Course/gists{/gist_id}","starred_url":"https://api.github.com/users/Engineering-Course/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Engineering-Course/subscriptions","organizations_url":"https://api.github.com/users/Engineering-Course/orgs","repos_url":"https://api.github.com/users/Engineering-Course/repos","events_url":"https://api.github.com/users/Engineering-Course/events{/privacy}","received_events_url":"https://api.github.com/users/Engineering-Course/received_events","type":"User","site_admin":false},"created_at":"2017-06-21T11:18:46Z","updated_at":"2017-06-21T11:18:46Z","body":"@gildorgood I have the same problem as yours. Have you fixed it up?"}}
{"actor":{"display_login":"Engineering-Course"}}