{"action":"created","issue":{"url":"https://api.github.com/repos/onnx/onnx/issues/630","repository_url":"https://api.github.com/repos/onnx/onnx","labels_url":"https://api.github.com/repos/onnx/onnx/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/onnx/onnx/issues/630/comments","events_url":"https://api.github.com/repos/onnx/onnx/issues/630/events","html_url":"https://github.com/onnx/onnx/issues/630","id":306754148,"node_id":"MDU6SXNzdWUzMDY3NTQxNDg=","number":630,"title":"Unrecognized attribute: exhaustive_search","user":{"login":"amandeepsaini","id":7319700,"node_id":"MDQ6VXNlcjczMTk3MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/7319700?v=4","gravatar_id":"","url":"https://api.github.com/users/amandeepsaini","html_url":"https://github.com/amandeepsaini","followers_url":"https://api.github.com/users/amandeepsaini/followers","following_url":"https://api.github.com/users/amandeepsaini/following{/other_user}","gists_url":"https://api.github.com/users/amandeepsaini/gists{/gist_id}","starred_url":"https://api.github.com/users/amandeepsaini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amandeepsaini/subscriptions","organizations_url":"https://api.github.com/users/amandeepsaini/orgs","repos_url":"https://api.github.com/users/amandeepsaini/repos","events_url":"https://api.github.com/users/amandeepsaini/events{/privacy}","received_events_url":"https://api.github.com/users/amandeepsaini/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-20T07:24:18Z","updated_at":"2018-10-18T04:33:00Z","closed_at":"2018-07-14T05:54:04Z","author_association":"NONE","body":"When I try to export the LeNet model from the caffe2 [Python MNIST Tutoria](https://github.com/caffe2/caffe2/blob/master/caffe2/python/tutorials/MNIST.ipynb)l, I get the following error:\r\n\r\n> WARNING: Logging before InitGoogleLogging() is written to STDERR\r\n> I0320 15:12:48.514922 31221 operator.cc:178] Engine CUDNN is not available for operator Conv.\r\n> I0320 15:12:48.514981 31221 operator.cc:178] Engine CUDNN is not available for operator Conv.\r\n> Traceback (most recent call last):\r\n>   File \"caffe2toOnnx.py\", line 24, in <module>\r\n>     value_info,\r\n>   File \"/usr/local/lib/python2.7/dist-packages/caffe2/python/onnx/frontend.py\", line 626, in caffe2_net_to_onnx_model\r\n>     model = make_model(cls.caffe2_net_to_onnx_graph(*args, **kwargs),\r\n>   File \"/usr/local/lib/python2.7/dist-packages/caffe2/python/onnx/frontend.py\", line 524, in caffe2_net_to_onnx_graph\r\n>     checker.check_graph(graph_def)\r\n>   File \"/home/artur/Desktop/onnxInstallSource/onnx/onnx/checker.py\", line 46, in checker\r\n>     proto.SerializeToString(), ctx)\r\n> onnx.onnx_cpp2py_export.checker.ValidationError: Unrecognized attribute: exhaustive_search\r\n> \r\n> ==> Context: Bad node spec: input: \"data_0\" input: \"conv1_w_0\" input: \"conv1_b_0\" output: \"conv1_1\" name: \"\" op_type: \"Conv\" attribute { name: \"exhaustive_search\" i: 0 type: INT } attribute { name: \"kernel_shape\" ints: 5 ints: 5 type: INTS }\r\n\r\n\r\nAs a reference, here is the code I added to the tutorial code to export the model:\r\n```\r\n\r\ndef save_net(INIT_NET, PREDICT_NET, model) :\r\n    \"\"\"Save the net to the locations specified by INIT_NET and PREDICT_NET \"\"\"\r\n    with open(PREDICT_NET, 'wb') as f:\r\n        f.write(model.net._net.SerializeToString())\r\n    init_net = caffe2_pb2.NetDef()\r\n    for param in model.params:\r\n        blob = workspace.FetchBlob(param)\r\n        shape = blob.shape\r\n        op = core.CreateOperator(\"GivenTensorFill\", [], [param],arg=[ utils.MakeArgument(\"shape\", shape),utils.MakeArgument(\"values\", blob)])\r\n        init_net.op.extend([op])\r\n    init_net.op.extend([core.CreateOperator(\"ConstantFill\", [], [\"data\"], shape=(1,30,30))])\r\n    with open(INIT_NET, 'wb') as f:\r\n        f.write(init_net.SerializeToString())\r\n\r\ndef saveModel(deploy_model, modelSaveDir):\r\n    \"\"\"Save Model\"\"\"    \r\n    with core.DeviceScope(core.DeviceOption(caffe2_pb2.CPU, 0)):\r\n\r\n        workspace.RunNetOnce(deploy_model.param_init_net)\r\n        workspace.CreateNet(deploy_model.net, overwrite=True)\r\n        INIT_NET = modelSaveDir + '/init_net.pb'\r\n        PREDICT_NET = modelSaveDir + '/predict_net.pb'\r\n        save_net(INIT_NET, PREDICT_NET, deploy_model)\r\n\r\nsaveModel(deploy_model, 'path/to/save/dir')\r\n\r\n```\r\n\r\n\r\nOther networks that I've trained from scratch also result in the same error. Any ideas on how I can resolve this issue?\r\n"},"comment":{"url":"https://api.github.com/repos/onnx/onnx/issues/comments/430872026","html_url":"https://github.com/onnx/onnx/issues/630#issuecomment-430872026","issue_url":"https://api.github.com/repos/onnx/onnx/issues/630","id":430872026,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDg3MjAyNg==","user":{"login":"parth1595","id":21214965,"node_id":"MDQ6VXNlcjIxMjE0OTY1","avatar_url":"https://avatars1.githubusercontent.com/u/21214965?v=4","gravatar_id":"","url":"https://api.github.com/users/parth1595","html_url":"https://github.com/parth1595","followers_url":"https://api.github.com/users/parth1595/followers","following_url":"https://api.github.com/users/parth1595/following{/other_user}","gists_url":"https://api.github.com/users/parth1595/gists{/gist_id}","starred_url":"https://api.github.com/users/parth1595/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parth1595/subscriptions","organizations_url":"https://api.github.com/users/parth1595/orgs","repos_url":"https://api.github.com/users/parth1595/repos","events_url":"https://api.github.com/users/parth1595/events{/privacy}","received_events_url":"https://api.github.com/users/parth1595/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T04:33:00Z","updated_at":"2018-10-18T04:33:00Z","author_association":"NONE","body":"Hi @suryaprakaz @houseroad \r\n\r\nI still see this issue while converting the mnist model from caffe2 to onnx. Also I have added the exhaustive_search attribute in _blacklist_caffe2_args but still found the same error as mentioned above in comment."}}
{"actor":{"display_login":"parth1595"}}