buriburisuri / speech-to-text-wavenet

Speech-to-Text-WaveNet : End-to-end sentence level English speech recognition based on DeepMind's WaveNet and tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

**ValueError: Tried to convert 'reduction_indices' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 2) - got shape [2], but wanted [].**

opened this issue Β· comments

When trying to run the pre-trained or training model receiving the below error πŸ‘

Traceback (most recent call last):
File "recognize.py", line 62, in
z = x.sg_conv1d(size=1, dim=num_dim, act='tanh', bn=True)
File "C:\Users\psharma\AppData\Local\Continuum\Anaconda3\lib\site-packages\sugartensor\sg_main.py", line 249, in wrapper
mean, variance = tf.nn.moments(out, axes=range(len(out.get_shape()) - 1))
File "C:\Users\psharma\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_impl.py", line 638, in moments
math_ops.reduce_mean(y, axes, keep_dims=True))
File "C:\Users\psharma\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 1355, in reduce_mean
name=name)
File "C:\Users\psharma\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 1290, in _mean
keep_dims=keep_dims, name=name)
File "C:\Users\psharma\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 508, in apply_op
(input_name, err))
ValueError: Tried to convert 'reduction_indices' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 2) - got shape [2], but wanted [].

I have tried changing the SugarTensor version from 0.2.3 to 0.0.1.9 but it does not help.
Can you please provide any pointers .

Python version - 3.6

Any thoughts ?

Am getting the same error in recognize.py
Any solutions?