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

construct_ufcnn with n_levels larger than one give error #6

Open
apastore opened this issue Dec 16, 2017 · 1 comment
Open

construct_ufcnn with n_levels larger than one give error #6

apastore opened this issue Dec 16, 2017 · 1 comment

Comments

@apastore
Copy link

Hi @nmayorov,
are you still working on this? construct_ufcnn give me this error if n_levels is different from 1.
I use python 2.7 and tensorflow: 1.1.0.

Thanks!
construct_ufcnn(n_inputs=1, n_outputs=2, n_levels=1, n_filters=10, filter_length=5, random_seed=0)
(<tf.Tensor 'Placeholder_8:0' shape=(?, ?, 1) dtype=float32>, <tf.Tensor 'Squeeze_4:0' shape=(?, ?, 2) dtype=float32>, [<tf.Variable 'Variable_60:0' shape=(1, 5, 1, 10) dtype=float32_ref>, <tf.Variable 'Variable_62:0' shape=(1, 5, 10, 10) dtype=float32_ref>, <tf.Variable 'Variable_64:0' shape=(1, 5, 10, 2) dtype=float32_ref>], [<tf.Variable 'Variable_61:0' shape=(10,) dtype=float32_ref>, <tf.Variable 'Variable_63:0' shape=(10,) dtype=float32_ref>, <tf.Variable 'Variable_65:0' shape=(2,) dtype=float32_ref>])

construct_ufcnn(n_inputs=1, n_outputs=2, n_levels=2, n_filters=10, filter_length=5, random_seed=0)
Traceback (most recent call last):
File "", line 1, in
File "ufcnn/ufcnn.py", line 264, in construct_ufcnn
x = tf.concat(3, [x_prev, x])
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1029, in concat
dtype=dtypes.int32).get_shape(
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 639, in convert_to_tensor
as_ref=False)
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 704, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 113, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 102, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 370, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/Users/pastorea/miniconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

@apastore
Copy link
Author

this fix it
if x_prev is not None:
x = tf.concat([x_prev, x],3)

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

1 participant