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

Error when change num_hidden = 256 #45

Closed
data-compute-geek opened this issue Mar 10, 2017 · 1 comment
Closed

Error when change num_hidden = 256 #45

data-compute-geek opened this issue Mar 10, 2017 · 1 comment

Comments

@data-compute-geek
Copy link

data-compute-geek commented Mar 10, 2017

In using char_lstm.ipyn I changed num_hidden from 512 to 256, and the model training finished without errors. But I got the following error message when I tried to make the inference model using the following command.

model_inf = rnn_model.LSTMInferenceModel(
num_lstm_layer,
len(vocab) + 1,
num_hidden=num_hidden,
num_embed=num_embed,
num_label=len(vocab) + 1,
arg_params=arg_params,
ctx=mx.gpu(),
dropout=0.2)

[22:45:14] /home/ec2-user/src/mxnet/dmlc-core/include/dmlc/logging.h:235: [22:45:14] src/ndarray/ndarray.cc:231: Check failed: from.shape() == to->shape() operands shape mismatch
Traceback (most recent call last):
File "", line 10, in
File "/home/ec2-user/mxnet-notebooks/python/tutorials1/rnn_model.py", line 34, in init
arg_params[key].copyto(self.executor.arg_dict[key])
File "/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/ndarray.py", line 533, in copyto
return _internal._copyto(self, out=other)
File "/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/ndarray.py", line 1225, in unary_ndarray_function
c_array(ctypes.c_char_p, [c_str(str(i)) for i in kwargs.values()])))
File "/usr/local/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/base.py", line 77, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [22:45:14] src/ndarray/ndarray.cc:231: Check failed: from.shape() == to->shape() operands shape mismatch

@data-compute-geek
Copy link
Author

Re-posted the issue to the main thread.

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

1 participant