ValueError in CTCLoss
See original GitHub issueUbuntu 14.
python train.py
results in :
INFO:tensorflow:0228:18:35:26.811:data.py:73] VCTK corpus loaded.(total data=36395, total batch=2274)
Traceback (most recent call last):
File "train.py", line 79, in <module>
loss = logit.sg_ctc(target=y, seq_len=seq_len)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/sugartensor/sg_main.py", line 151, in wrapper
out = func(tensor, tf.sg_opt(kwargs))
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/sugartensor/sg_loss.py", line 226, in sg_ctc
ctc_merge_repeated=opt.merge, time_major=False)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/ops/ctc_ops.py", line 145, in ctc_loss
ctc_merge_repeated=ctc_merge_repeated)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_ctc_ops.py", line 164, in _ctc_loss
name=name)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2397, in create_op
set_shapes_for_outputs(ret)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1757, in set_shapes_for_outputs
shapes = shape_func(op)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1707, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/home/gvoysey/.local/share/virtualenvs/speech-to-text-wavenet/local/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 675, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Shape must be rank 1 but is rank 0 for 'CTCLoss' (op: 'CTCLoss') with input shapes: [?,16,28], [?,2], [?], [].
Any ideas?
tensorflow version 1.0.0
sugartensor version 1.0.0.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
ValueError in CTCLoss · Issue #12957 · tensorflow ... - GitHub
This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that...
Read more >Developers - ValueError in CTCLoss - - Bountysource
ValueError in CTCLoss. ... ValueError: Shape must be rank 1 but is rank 0 for 'CTCLoss' (op: 'CTCLoss') with input shapes: [?,16,28], [?,2],...
Read more >ValueError: Exception encountered when calling layer "ctc_loss"
Tensorflow Beginner here. I got this error message and I have no clue what to do, where to look or what to change?...
Read more >Keras Lambda Layers not supported for CTC Loss
I am looking to implement CTC loss function within CoreML. I tried, as a starting point, ... ValueError: Keras layer '<class 'keras.layers.core.
Read more >Python Examples of warpctc_pytorch.CTCLoss
This page shows Python examples of warpctc_pytorch.CTCLoss. ... CTCLoss(size_average=True, reduce=reduce) else: raise ValueError( 'ctc_type must be ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try replacing
dims
withaxis
in line 35 of train.py if you are using TF 1.0. The argument namedims
has changed toaxis
in many functions.seq_len = tf.not_equal(x.sg_sum(dims=2), 0.).sg_int().sg_sum(dims=1)
is this still relevant?