This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
terminate called after throwing an instance of 'std::out_of_range’ #8663
Labels
Comments
similar problem has been spotted, as i tried to execute some code like this: def gen_sym(seq_len):
data=mx.sym.Variable('data')
label = mx.sym.Variable('label') # NT
output, _ = stack.unroll(seq_len, inputs=data, merge_outputs=False, layout='NT')
pred = output[seq_len-1]
pred = mx.sym.reshape(pred, shape=(batch_size,-1))
pred_e = mx.sym.FullyConnected(data= pred, num_hidden=1)
sym = mx.sym.broadcast_add(pred_e, label)
sym = mx.sym.MakeLoss(sym)
return sym, ('data', ), ('label', ) However, if i replace Error info
The point where this error occurs seems to be unpredictable. It could be thrown out before executing ################## SAMPLE 1 ######################
$ python main.py
WARNING: discarded 0 sentences longer than the largest bucket.
WARNING: discarded 0 sentences longer than the largest bucket.
begin one forward_backward, data_batch shape: (10L, 9L)
begin one forward_backward, data_batch shape: (10L, 9L)
begin one forward_backward, data_batch shape: (10L, 9L)
[xxxx-xx-xx 21:19:07,066] {/usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/callback.py:166} INFO - Epoch[0] Batch [2] Speed: 188.98 samples/sec mse=0.329261
begin one forward_backward, data_batch shape: (10L, 9L)
begin one forward_backward, data_batch shape: (10L, 9L)
terminate called after throwing an instance of 'std::out_of_range'
what(): _Map_base::at
Aborted (core dumped)
################## SAMPLE 2 ######################
$ python main.py
WARNING: discarded 0 sentences longer than the largest bucket.
WARNING: discarded 0 sentences longer than the largest bucket.
begin one forward_backward, data_batch shape: (10L, 6L)
terminate called after throwing an instance of 'std::out_of_range'
what(): _Map_base::at
Aborted (core dumped) |
@eric-haibin-lin Please tag - "Exception Handling" "Symbol" "Question" |
3 tasks
@eric-haibin-lin also, please tag "Bug" for the crash. |
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
(Brief description of the problem in no more than 2 sentences.)
Environment info (Required)
Python 2.7.13 Numpy 1.13.1 MXNet 0.12rc0
Steps to reproduce
result
The text was updated successfully, but these errors were encountered: