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 using CustBatchNorm Operator #4

Open
GengZ opened this issue Feb 11, 2018 · 0 comments
Open

Error when using CustBatchNorm Operator #4

GengZ opened this issue Feb 11, 2018 · 0 comments

Comments

@GengZ
Copy link

GengZ commented Feb 11, 2018

Hi, nice code.

Could run when replace the custbatchnorm with mxnet default BN operator, followed by transfer model by hand. Yet when use your custbatchnorm in transfer_model, Error as follows:

W0209 13:41:59 33291 minpy.dispatch.registry:register:47] Type MXNet for name reshape has already existed
[DataDesc[data,(1, 3L, 127L, 127L),<type 'numpy.float32'>,NCHW]]
Error in custbatchnorm.infer_type: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/operator.py", line 651, in infer_type_entry
types = [_DTYPE_MX_TO_NP[tensor_types[i]] for i in range(n_in)]
KeyError: -1

[13:41:59] /data/home/bcheng/git_ssd/mxnet-msra/dmlc-core/include/dmlc/./logging.h:300: [13:41:59] src/operator/custom/./custom-inl.h:225: Check failed: reinterpret_cast(info_->callbacks[kCustomOpPropInferType])( types.size(), types.data(), info_->contexts[kCustomOpPropInferType] )

Stack trace returned 10 entries:
[bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7fed3b12de6c]
[bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(ZNK5mxnet2op12CustomOpProp9InferTypeEPSt6vectorIiSaIiEES5_S5+0xe07) [0x7fed3b9280a7]
[bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(+0xe04ec3) [0x7fed3b9b7ec3]
[bt] (3) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(+0x1dc02da) [0x7fed3c9732da]
[bt] (4) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(+0x1dc1612) [0x7fed3c974612]
[bt] (5) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(+0x1dc2483) [0x7fed3c975483]
[bt] (6) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm11ApplyPassesENS_5GraphERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x32c) [0x7fed3c99d94c]
[bt] (7) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(_ZN4nnvm9ApplyPassENS_5GraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x3c9) [0x7fed3bd2a999]
[bt] (8) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(MXSymbolInferType+0x8ef) [0x7fed3bd263cf]
[bt] (9) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fed54751e40]

Added infer_type but still does not work.

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