{"action":"created","issue":{"url":"https://api.github.com/repos/onnx/onnx-tensorflow/issues/143","repository_url":"https://api.github.com/repos/onnx/onnx-tensorflow","labels_url":"https://api.github.com/repos/onnx/onnx-tensorflow/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/onnx/onnx-tensorflow/issues/143/comments","events_url":"https://api.github.com/repos/onnx/onnx-tensorflow/issues/143/events","html_url":"https://github.com/onnx/onnx-tensorflow/issues/143","id":318677254,"number":143,"title":"Porting TensorFlow graph to Onnx graph using TensorFlow iris classification as an example","user":{"login":"mufz","id":6203826,"avatar_url":"https://avatars2.githubusercontent.com/u/6203826?v=4","gravatar_id":"","url":"https://api.github.com/users/mufz","html_url":"https://github.com/mufz","followers_url":"https://api.github.com/users/mufz/followers","following_url":"https://api.github.com/users/mufz/following{/other_user}","gists_url":"https://api.github.com/users/mufz/gists{/gist_id}","starred_url":"https://api.github.com/users/mufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mufz/subscriptions","organizations_url":"https://api.github.com/users/mufz/orgs","repos_url":"https://api.github.com/users/mufz/repos","events_url":"https://api.github.com/users/mufz/events{/privacy}","received_events_url":"https://api.github.com/users/mufz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-28T23:49:35Z","updated_at":"2018-04-29T23:35:18Z","closed_at":null,"author_association":"NONE","body":"Hi \r\n\r\nI am trying to port tensorflow graph to Onnx graph using this library. To start with I am using a very simple example that is part of the tensorflow tutorials. I generated a tensorflow graph using the tensorflow estimator API. Once I generated the graph I am using the below code to port it to Onnx graph. \r\n\r\nWhen I run the below code I am getting an error message that unable to convert lambda function. Can you guys point me in the right direction or pointers to any documentation might help ?\r\n\r\n`saver = tf.train.import_meta_graph('/TensorFlow/tf_getting_started_git/models/samples/core/get_started/models/iris/model.ckpt-1000.meta', clear_devices=True)\r\ngraph = tf.get_default_graph()\r\ninput_graph_def = graph.as_graph_def()\r\n\r\n\r\n# Preprocessing: load the old model\r\noutput_node=\"dnn/head/sparse_softmax_cross_entropy_loss/Mul\"\r\n\r\nonnx_graph = convert_graph(input_graph_def, output_node)\r\nonnx_model = helper.make_model(onnx_graph)\r\n\r\n\r\n# Preprocessing: get the path to the saved model\r\nnew_model_path = os.path.join('models', 'converted.onnx')\r\n\r\n# Save the ONNX model\r\nonnx.save(onnx_model, new_model_path)`"},"comment":{"url":"https://api.github.com/repos/onnx/onnx-tensorflow/issues/comments/385290513","html_url":"https://github.com/onnx/onnx-tensorflow/issues/143#issuecomment-385290513","issue_url":"https://api.github.com/repos/onnx/onnx-tensorflow/issues/143","id":385290513,"user":{"login":"mufz","id":6203826,"avatar_url":"https://avatars2.githubusercontent.com/u/6203826?v=4","gravatar_id":"","url":"https://api.github.com/users/mufz","html_url":"https://github.com/mufz","followers_url":"https://api.github.com/users/mufz/followers","following_url":"https://api.github.com/users/mufz/following{/other_user}","gists_url":"https://api.github.com/users/mufz/gists{/gist_id}","starred_url":"https://api.github.com/users/mufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mufz/subscriptions","organizations_url":"https://api.github.com/users/mufz/orgs","repos_url":"https://api.github.com/users/mufz/repos","events_url":"https://api.github.com/users/mufz/events{/privacy}","received_events_url":"https://api.github.com/users/mufz/received_events","type":"User","site_admin":false},"created_at":"2018-04-29T23:35:18Z","updated_at":"2018-04-29T23:35:18Z","author_association":"NONE","body":"Thanks for the tutorial pointer. The error that i am seeing occurs at the convert_graph step. \r\n\r\nJust to add to my previous comment I am using the following code to create the graph object in the above code \r\n\r\nhttps://github.com/tensorflow/models/blob/master/samples/core/get_started/premade_estimator.py\r\n\r\nI will try the steps in the frontend tutorial and update you on this goes."}}
{"actor":{"display_login":"mufz"}}