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

TypeError: Expected int32, got list containing Tensors of type '_Message' instead #6

Open
softwarentu opened this issue Mar 29, 2018 · 4 comments

Comments

@softwarentu
Copy link

Hi @zhr1201 ,
I'm very interested in your paper and want to know more about the details of the research through your source code, but I have the following problems when I run the code on the sample data provided by you.

Traceback (most recent call last):
File "SENN_train.py", line 191, in
train()
File "SENN_train.py", line 105, in train
images, targets = SE_Net.inputs(data_frames)
File "SENN.py", line 115, in inputs
for i in range(0, self.batch_size, 1)])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1172, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 946, in convert_to_tensor
as_ref=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1036, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 235, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 214, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 433, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 344, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

@zhr1201
Copy link
Owner

zhr1201 commented Mar 29, 2018

I guess it's due to different tensorflow versions but I am not quite sure and don't have enough spare time to check the problem you have, sorry.

@softwarentu
Copy link
Author

Thanks. Can you tell me what version of tensorflow you are using?

@zhr1201
Copy link
Owner

zhr1201 commented Mar 30, 2018

I used tf r 0.11 at that time, I guess maybe 0.12 will also work fine(but I am not sure).

@my1347
Copy link

my1347 commented Jul 11, 2018

@gemengsoftware @zhr1201 Please change "SENN.py" line110
from
`targets = tf.concat(

        [tf.reshape(0,
            speech_f[i][self.N_IN - 1][0:self.NEFF],
            [1, self.NEFF])
         for i in range(0, self.batch_size, 1)])`

to
`targets = tf.concat(

        [tf.reshape(
            speech_f[i][self.N_IN - 1][0:self.NEFF],
            [1, self.NEFF])
         for i in range(0, self.batch_size, 1)],0)`

tf.concat order of input parameters has been changed.

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

3 participants