| onnx_graph_info | R Documentation |
The parsed graph as a table: one row per node, with its operator type and the names of its inputs and outputs. Use it to find which node produces a given edge, or what an edge feeds into, without re-parsing the file.
onnx_graph_info(model, producer_of = NULL, consumer_of = NULL)
model |
An |
producer_of |
Optional edge name. When given, returns the rows whose node lists that name among its outputs. |
consumer_of |
Optional edge name. When given, returns the rows whose node lists that name among its inputs. |
Reading the structure beats searching the .onnx binary for a name:
a name occurs both as a producer's output and as its consumers' input, and
telling those apart by hand means getting the protobuf field numbers right
every time.
A data frame with columns index, op_type,
output (the first output) and list-columns outputs and
inputs.
if (file.exists("model.onnx")) {
m <- onnx_load("model.onnx")
g <- onnx_graph_info(m)
head(g)
onnx_graph_info(m, producer_of = "881")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.