Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

"Ambiguous dimension: 24.5" in decoder call #5

Description

@GregStacey

I'm trying to run the VAE example by copying and pasting the code into a .py file. I'm getting the error below when I try to run it. Unfortunately I'm a python newbie and don't know what's going on. Any help is appreciated!

In [64]: dec = decoder(sampled, keep_prob)
Traceback (most recent call last):

File "", line 1, in
dec = decoder(sampled, keep_prob)

File "", line 60, in decoder
x = tf.layers.dense(sampled_z, units=inputs_decoder, activation=lrelu)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/layers/core.py", line 215, in dense
return layer.apply(inputs)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 492, in apply
return self.call(inputs, *args, **kwargs)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 434, in call
self.build(input_shapes[0])

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/layers/core.py", line 118, in build
trainable=True)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 374, in add_variable
trainable=trainable and self.trainable)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 1065, in get_variable
use_resource=use_resource, custom_getter=custom_getter)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 962, in get_variable
use_resource=use_resource, custom_getter=custom_getter)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 367, in get_variable
validate_shape=validate_shape, use_resource=use_resource)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 352, in _true_getter
use_resource=use_resource)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 653, in _get_single_variable
shape = tensor_shape.as_shape(shape)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 798, in as_shape
return TensorShape(shape)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 434, in init
self._dims = [as_dimension(d) for d in dims_iter]

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 434, in
self._dims = [as_dimension(d) for d in dims_iter]

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 376, in as_dimension
return Dimension(value)

File "/Users/Mercy/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 35, in init
raise ValueError("Ambiguous dimension: %s" % value)

ValueError: Ambiguous dimension: 24.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions