ENV(pip list)
tensorflow (0.12.0rc0)
prettytensor (0.6.2)
When I run this command
python main-vae.py
I encounter following problems. So I want to know what the env should be, or what should I do to fix the bug? Thanks for help.
WARNING:tensorflow:From main-vae.py:134 in .: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use tf.global_variables_initializer
instead.
Traceback (most recent call last):
File "main-vae.py", line 148, in
_, loss_value = sess.run([train, loss], {input_tensor: x})
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value model/conv2d/weights
[[Node: model/conv2d/weights/read = IdentityT=DT_FLOAT, _class=["loc:@model/conv2d/weights"], _device="/job:localhost/replica:0/task:0/cpu:0"]]
Caused by op u'model/conv2d/weights/read', defined at:
File "main-vae.py", line 120, in
output_tensor, mean, stddev = decoder(encoder(input_tensor))
File "main-vae.py", line 42, in encoder
conv2d(5, 32, stride=2).
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1981, in method
result = func(non_seq_layer, *args, **kwargs)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_image_methods.py", line 159, in call
params = self.variable('weights', size, init, dt=dtype)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1695, in variable
collections=variable_collections)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable
custom_getter=custom_getter)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable
custom_getter=custom_getter)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable
validate_shape=validate_shape)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 677, in _get_single_variable
expected_shape=shape)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 224, in init
expected_shape=expected_shape)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 370, in _init_from_args
self._snapshot = array_ops.identity(self._variable, name="read")
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1424, in identity
result = _op_def_lib.apply_op("Identity", input=input, name=name)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
op_def=op_def)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/tangluming/niuge/ENV/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1128, in init
self._traceback = _extract_stack()
FailedPreconditionError (see above for traceback): Attempting to use uninitialized value model/conv2d/weights
[[Node: model/conv2d/weights/read = IdentityT=DT_FLOAT, _class=["loc:@model/conv2d/weights"], _device="/job:localhost/replica:0/task:0/cpu:0"]]