Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

bucket iterator with ctc error #3207

Closed
zhangjiulong opened this issue Sep 2, 2016 · 2 comments
Closed

bucket iterator with ctc error #3207

zhangjiulong opened this issue Sep 2, 2016 · 2 comments

Comments

@zhangjiulong
Copy link

I want to test flexible length input with warpctc
because the rnn is an example of bucket iterator
So I modified the rnn/lstm.py as follows
I modified def lstm_unroll funciton

#sm = mx.sym.SoftmaxOutput(data=pred, label=label, name='softmax')
sm = mx.sym.WarpCTC(data=pred, label=label, label_length = num_label, input_length = seq_len)

But got the following error:

bucket of len  46 : 34 samples
bucket of len  74 : 27 samples
[17:32:46] src/operator/./reshape-inl.h:249: Using target_shape will be deprecated.
Traceback (most recent call last):
  File "lstm_bucketing.py", line 76, in <module>
    batch_end_callback=mx.callback.Speedometer(batch_size, 50),)
  File "../../python/mxnet/model.py", line 746, in fit
    self._init_params(dict(data.provide_data+data.provide_label))
  File "../../python/mxnet/model.py", line 486, in _init_params
    arg_shapes, _, aux_shapes = self.symbol.infer_shape(**input_shapes)
  File "../../python/mxnet/symbol.py", line 453, in infer_shape
    return self._infer_shape_impl(False, *args, **kwargs)
  File "../../python/mxnet/symbol.py", line 513, in _infer_shape_impl
    ctypes.byref(complete)))
  File "../../python/mxnet/base.py", line 77, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: InferShape Error in warpctc0's label argument

Please help me to locate the error.

@firestonelib
Copy link

Hi, @zhangjiulong I've also met this error, can you tell me how to solve that?

@szha
Copy link
Member

szha commented Oct 30, 2017

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!
Also, do please check out our forum (and Chinese version) for general "how-to" questions.

@szha szha closed this as completed Oct 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants