-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Loop, If and Scan support #168
Comments
Can you share a sample file for each and describe what support you are looking for? |
Currently Netron shows onnxwhile as an op without an option to explore the inner network which is a parameter in the onnxwhile op. It would be helpfull to be able to double click the op and see the inner network. The below code defines a simple caffe2 network which is using onnxwhile and converts it to onnx (this part currenly doesnt work since caffe2 onnx exporter doesnt support this yet). `from caffe2.python import workspace, model_helper,core Now import the caffe2 mobile exporterfrom caffe2.python.predictor import mobile_exporter from caffe2.python.onnx import frontend Create the initial input dataworkspace.ResetWorkspace() Create body netbody_net = caffe2_pb2.NetDef() Two loop carried dependencies: first and secondbody_net.external_input.extend(['i', 'cond', 'first', 'second']) while_op = core.CreateOperator( main_net = caffe2_pb2.NetDef() workspace_global_options = ['--caffe2_log_level=1'] init_net, predict_net = mobile_exporter.Export(workspace, main_net, main_net.external_input) fopen.write(str(init_net))#with open('predict_net.pbtxt', "w") as fopen: fopen.write(str(predict_net))Convert to ONNXonnx_value_info = { onnx_model = frontend.caffe2_net_to_onnx_model( Run networkworkspace.RunNetOnce(main_net) This sample is based on "onnxwhile" op testing code of caffe2 whith add of conversion code to onnx |
Since caffe2 export to onnx doesnt support this op yet (I opened an issue in pytorch/caffe2 repo) i dont have an ONNX file. |
@lutzroeder is it now possible to review the contents of such |
Hi, are you planning to also expand subgraphs in the future ? |
+1. It would be great to be able to visualize the sub-graphs in the ONNX models. Looking forward to this feature. |
+1 The models I'm currently working with start off with If operators and netron can't visualize the model at all, is there any current workaround for this? |
Here is an example of DLRM using loop operators. The symbol for the loop operators can be seen and the attributes show the graph value but none of the operators (gather, slice, etc.) inside the loop can be viewed (w/ Netron 4.5.5). The following shows the operators inside the top loop:
|
Any update on this feature implementation? |
Is there roadmap for supporting operators of loop type:
For example:
ONNX Loop
Caffe2 ONNXWhile
The text was updated successfully, but these errors were encountered: