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

SENN_train cannot run #19

Open
Franky0620 opened this issue Oct 16, 2019 · 11 comments
Open

SENN_train cannot run #19

Franky0620 opened this issue Oct 16, 2019 · 11 comments

Comments

@Franky0620
Copy link

I set the Path of data, but it has the problem on " images, targets = SE_Net.inputs(data_frames)"

@Huer-H
Copy link

Huer-H commented Oct 18, 2019

Hello, I have the same problem as you. How do you solve it?

@zhr1201
Copy link
Owner

zhr1201 commented Oct 18, 2019

I think it is caused by different versions of python and its dependencies. You should check the error details to get that working on your versions of software

@Franky0620
Copy link
Author

I think it is caused by different versions of python and its dependencies. You should check the error details to get that working on your versions of software

I test on Python 3.7 3.6 3.5, while, not working . The issue is happed on SENN.py, for i in range(0, self.batch_size, 1)])....

@Franky0620
Copy link
Author

Hello, I have the same problem as you. How do you solve it?

still not working....

@zhr1201
Copy link
Owner

zhr1201 commented Oct 18, 2019

Please please please read the error message carefully otherwise you are not moving in the right direction

@Huer-H
Copy link

Huer-H commented Oct 21, 2019

targets = tf.concat(0,[tf.reshape(speech_f[i][self.N_IN - 1][0:self.NEFF],[1, self.NEFF]) for i in range(0, self.batch_size, 1)])
There is a problem with this part of the code (senn.py)
----ValueError: Shapes (20, 1, 129) and () are incompatible---
20 is batch_size

@Huer-H
Copy link

Huer-H commented Oct 21, 2019

I have modified this part of the code

targets = tf.concat(0,[tf.reshape(speech_f[i][self.N_IN - 1][0:self.NEFF],[1, self.NEFF]) for i in range(0, self.batch_size, 1)])------------------------>
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)

The error message is now gone

@zhr1201
Copy link
Owner

zhr1201 commented Oct 21, 2019

@JH2018-2021 Thx! Could you please list your tf version so that other people with the same version of tensorflow can refer to this issue to solve their problems.

@Luciferhy
Copy link

@JYH9351 May I ask which version of tensorflow are you using?

@Luciferhy
Copy link

/usr/local/lib/python2.7/dist-packages/librosa/init.py:35: FutureWarning: You are using librosa with Python 2. Please note that librosa 0.7 will be the last version to support Python 2, after which it will require Python 3 or later.
FutureWarning)
11572 speech found
11572 noise found
824 speech found
824 noise found
Traceback (most recent call last):
File "SENN_train.py", line 191, in
train()
File "SENN_train.py", line 122, in train
sess.run(init)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 717, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 915, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 965, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 985, in _do_call
raise type(e)(node_def, op, message)
InvalidArgumentError: No OpKernel was registered to support Op 'FFT' with these attrs. Registered kernels:

     [[Node: FFT_1 = FFT[](Cast_1)]]

Caused by op u'FFT_1', defined at:
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 98, in inputs
speech_f0 = tf.fft(tf.cast(raw_speech, tf.complex64))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 798, in fft
result = _op_def_lib.apply_op("FFT", input=input, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 749, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2380, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1298, in init
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'FFT' with these attrs. Registered kernels:

     [[Node: FFT_1 = FFT[](Cast_1)]]

我遇到一个这个问题,查了一下是由于CPU版上没有FFT操作对象之类的,请问是必须要在GPU上运行吗? @zhr1201

@Lerry123
Copy link

@Luciferhy 你这个问题解决了吗?我也遇到同样的问题。

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

5 participants