Raising num_args bound ?
When I try to compile LSTM with quite a long time steps (200), following error occurs,
71 """
72 if ret != 0:
---> 73 raise MXNetError(py_str(_LIB.MXGetLastError()))
74
75 def c_str(string):
MXNetError: value 100for Parameter num_args exceed bound [1,100)
It seems that for whatever reason, 100 is a hard limit on the number of args that can be compiled ? I wonder whether we can change this bound (if we have more memory)
Thanks !
Please submit a PR for this, this was due to some choices in the parameters side. You should be able to locate the num_args in the operators you performed. Instead of using DECLARE_PARAMETER(num_args).set_range(1,100) change it to DECLARE_PARAMETER(num_args).set_lower_bound(1)
cc @antinucleon
Thx ! Given that we can set this using that command, what you suggest the PR is for ?
Oh, this is the code on C++ side, not python. for example https://github.com/dmlc/mxnet/blob/master/src/operator/concat-inl.h#L31
This being said, I do not know in which specific operator this num_args constraint sits, so will need a bit of your help in catching it:)
Can we treat it as a global environment variable ?
The idea is by default we should have no limit in num_args. The previous settings are quite arbitrary and should be corrected
seems that the only place where this hard limit is placed is
struct ElementWiseSumParam : public dmlc::Parameter<ElementWiseSumParam> {
30 int num_args;
31 DMLC_DECLARE_PARAMETER(ElementWiseSumParam) {
32 DMLC_DECLARE_FIELD(num_args).set_range(1, 100)
in src/operator/elementwise_sum-inl.h
It seems suffices to just remove that constraint there
Yes, pls go ahead to do so On Mon, Nov 2, 2015 at 12:32 PM Kublai-Jing [email protected] wrote:
seems that the only place where this hard limit is placed is
struct ElementWiseSumParam : public dmlc::Parameter
{ 30 int num_args; 31 DMLC_DECLARE_PARAMETER(ElementWiseSumParam) { 32 DMLC_DECLARE_FIELD(num_args).set_range(1, 100) in src/operator/elementwise_sum-inl.h
It seems suffices to just remove that constraint there
— Reply to this email directly or view it on GitHub https://github.com/dmlc/mxnet/issues/467#issuecomment-153148076.
Thanks to @Kublai-Jing fixed by #469