{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/MMdnn/issues/316","repository_url":"https://api.github.com/repos/Microsoft/MMdnn","labels_url":"https://api.github.com/repos/Microsoft/MMdnn/issues/316/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/MMdnn/issues/316/comments","events_url":"https://api.github.com/repos/Microsoft/MMdnn/issues/316/events","html_url":"https://github.com/Microsoft/MMdnn/issues/316","id":341388792,"node_id":"MDU6SXNzdWUzNDEzODg3OTI=","number":316,"title":"Custom operator support for conversion from MXNet to PyTorch","user":{"login":"farleylai","id":158540,"node_id":"MDQ6VXNlcjE1ODU0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/158540?v=4","gravatar_id":"","url":"https://api.github.com/users/farleylai","html_url":"https://github.com/farleylai","followers_url":"https://api.github.com/users/farleylai/followers","following_url":"https://api.github.com/users/farleylai/following{/other_user}","gists_url":"https://api.github.com/users/farleylai/gists{/gist_id}","starred_url":"https://api.github.com/users/farleylai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farleylai/subscriptions","organizations_url":"https://api.github.com/users/farleylai/orgs","repos_url":"https://api.github.com/users/farleylai/repos","events_url":"https://api.github.com/users/farleylai/events{/privacy}","received_events_url":"https://api.github.com/users/farleylai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-16T04:39:18Z","updated_at":"2018-12-05T09:42:23Z","closed_at":null,"author_association":"NONE","body":"Platform: ubuntu 16.04:\r\nPython version: 3.6\r\nSource framework with version:  mxnet-cu92mkl 1.2.0 \r\nDestination framework with version: pytorch-0.4 with GPU\r\nRunning scripts:\r\n\r\n```\r\nSYM=mxnet/Deformable-ConvNets/rfcn/resnet_v1_101_rfcn_dcn.json\r\nPARAMS=mxnet/Deformable-ConvNets/params/rfcn_dcn_coco-0000.params\r\n\r\nmmconvert -sf mxnet -in $SYM -iw $PARAMS --dstNodeName MMdnn_Output -df pytorch -om res101_rfcn_dcn_coco.pth --inputShape 3 224 224\r\n```\r\n\r\nError:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/_script/convertToIR.py\", line 189, in <module>\r\n    _main()\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/_script/convertToIR.py\", line 184, in _main\r\n    ret = _convert(args)\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/_script/convertToIR.py\", line 68, in _convert\r\n    parser = MXNetParser(model)\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/mxnet/mxnet_parser.py\", line 239, in __init__\r\n    self.model, self.weight_data = MXNetParser._load_model(input_arg[1], input_arg[2])\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/mxnet/mxnet_parser.py\", line 172, in _load_model\r\n    sym, arg_params, aux_params = mx.model.load_checkpoint(weights, int(epoch))\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mxnet/model.py\", line 419, in load_checkpoint\r\n    symbol = sym.load('%s-symbol.json' % prefix)\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mxnet/symbol/symbol.py\", line 2535, in load\r\n    check_call(_LIB.MXSymbolCreateFromFile(c_str(fname), ctypes.byref(handle)))\r\n  File \"/home/ml/farleylai/anaconda3/lib/python3.6/site-packages/mxnet/base.py\", line 149, in check_call\r\n    raise MXNetError(py_str(_LIB.MXGetLastError()))\r\nmxnet.base.MXNetError: [00:13:37] src/operator/custom/custom.cc:104: Check failed: CustomOperator::Get()->Find(params.op_type) != nullptr Cannot find custom operator proposal\r\n```\r\n\r\nThe pre-trained model is downloaded from the [Deformable-ConvNets](https://github.com/msracver/Deformable-ConvNets) which contains a custom operator 'proposal.'\r\n\r\nThe custom operator is a python module in the source tree.\r\nIs there any way to instruct MMdnn to import the custom operator?\r\nOr the custom operator for conversion from MXNet is not suppored yet?"},"comment":{"url":"https://api.github.com/repos/Microsoft/MMdnn/issues/comments/444422318","html_url":"https://github.com/Microsoft/MMdnn/issues/316#issuecomment-444422318","issue_url":"https://api.github.com/repos/Microsoft/MMdnn/issues/316","id":444422318,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDQyMjMxOA==","user":{"login":"ToBigboss","id":40013733,"node_id":"MDQ6VXNlcjQwMDEzNzMz","avatar_url":"https://avatars3.githubusercontent.com/u/40013733?v=4","gravatar_id":"","url":"https://api.github.com/users/ToBigboss","html_url":"https://github.com/ToBigboss","followers_url":"https://api.github.com/users/ToBigboss/followers","following_url":"https://api.github.com/users/ToBigboss/following{/other_user}","gists_url":"https://api.github.com/users/ToBigboss/gists{/gist_id}","starred_url":"https://api.github.com/users/ToBigboss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToBigboss/subscriptions","organizations_url":"https://api.github.com/users/ToBigboss/orgs","repos_url":"https://api.github.com/users/ToBigboss/repos","events_url":"https://api.github.com/users/ToBigboss/events{/privacy}","received_events_url":"https://api.github.com/users/ToBigboss/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T09:42:23Z","updated_at":"2018-12-05T09:42:23Z","author_association":"NONE","body":"> Hi @farleylai . In current MMdnn, custom operator is not supported yet. Thanks.\r\n\r\nHi，@kitstar\r\nhttps://github.com/Microsoft/MMdnn/wiki/Contribution-Guideline，The above link provide the method to add customized op, but you say “custom operator is not supported yet”，I‘m confused, can you confirm that, thinks."}}
{"actor":{"display_login":"ToBigboss"}}