Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error running cnn_uci.py #2

Closed
rjpg opened this issue Apr 20, 2019 · 1 comment
Closed

error running cnn_uci.py #2

rjpg opened this issue Apr 20, 2019 · 1 comment

Comments

@rjpg
Copy link

rjpg commented Apr 20, 2019

/> python cnn_uci.py

/home/rjpg/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Loading UCI dataset...
Dataset was uploaded

Creating CNN architecture

Traceback (most recent call last):
  File "cnn_uci.py", line 127, in <module>
    h_hidden = tf.concat(1, [h_flat, h_feat])
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1110, in concat
    dtype=dtypes.int32).get_shape().assert_is_compatible_with(
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1011, in convert_to_tensor
    as_ref=False)
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1107, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 217, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 196, in constant
    value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 436, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/home/rjpg/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 347, in _AssertCompatible
    (dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

@aiff22
Copy link
Owner

aiff22 commented Jul 24, 2019

The problem is caused by new TensorFlow API for tf.concat function. Please refer to the following guide showing how to fix this issue: #3 (comment)

@aiff22 aiff22 closed this as completed Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants