Class GraphProto
Graphs
A graph defines the computational logic of a model and is comprised of a parameterized
list of nodes that form a directed acyclic graph based on their inputs and outputs.
This is the equivalent of the "network" or "graph" in many deep learning
frameworks.
Namespace: Onnx
Syntax
public sealed class GraphProto : Google.Protobuf.IMessage<GraphProto>
Constructors
GraphProto()
Declaration
GraphProto(GraphProto)
Declaration
public GraphProto(GraphProto other)
Parameters
Fields
DocStringFieldNumber
Field number for the "doc_string" field.
Declaration
public const int DocStringFieldNumber = 10
Field Value
InitializerFieldNumber
Field number for the "initializer" field.
Declaration
public const int InitializerFieldNumber = 5
Field Value
Field number for the "input" field.
Declaration
public const int InputFieldNumber = 11
Field Value
NameFieldNumber
Field number for the "name" field.
Declaration
public const int NameFieldNumber = 2
Field Value
NodeFieldNumber
Field number for the "node" field.
Declaration
public const int NodeFieldNumber = 1
Field Value
OutputFieldNumber
Field number for the "output" field.
Declaration
public const int OutputFieldNumber = 12
Field Value
QuantizationAnnotationFieldNumber
Field number for the "quantization_annotation" field.
Declaration
public const int QuantizationAnnotationFieldNumber = 14
Field Value
SparseInitializerFieldNumber
Field number for the "sparse_initializer" field.
Declaration
public const int SparseInitializerFieldNumber = 15
Field Value
ValueInfoFieldNumber
Field number for the "value_info" field.
Declaration
public const int ValueInfoFieldNumber = 13
Field Value
Properties
Descriptor
Declaration
public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
Type |
Description |
Google.Protobuf.Reflection.MessageDescriptor |
|
DocString
A human-readable documentation for this graph. Markdown is allowed.
Declaration
public string DocString { get; set; }
Property Value
Initializer
A list of named tensor values, used to specify constant inputs of the graph.
Each TensorProto entry must have a distinct name (within the list) that
MAY also appear in the input list.
Declaration
public Google.Protobuf.Collections.RepeatedField<TensorProto> Initializer { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<TensorProto> |
|
The inputs and outputs of the graph.
Declaration
public Google.Protobuf.Collections.RepeatedField<ValueInfoProto> Input { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<ValueInfoProto> |
|
Name
Declaration
public string Name { get; set; }
Property Value
Node
The nodes in the graph, sorted topologically.
Declaration
public Google.Protobuf.Collections.RepeatedField<NodeProto> Node { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<NodeProto> |
|
Output
Declaration
public Google.Protobuf.Collections.RepeatedField<ValueInfoProto> Output { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<ValueInfoProto> |
|
Parser
Declaration
public static Google.Protobuf.MessageParser<GraphProto> Parser { get; }
Property Value
Type |
Description |
Google.Protobuf.MessageParser<GraphProto> |
|
QuantizationAnnotation
This field carries information to indicate the mapping among a tensor and its
quantization parameter tensors. For example:
For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
Declaration
public Google.Protobuf.Collections.RepeatedField<TensorAnnotation> QuantizationAnnotation { get; }
Property Value
SparseInitializer
Initializers (see above) stored in sparse format.
Declaration
public Google.Protobuf.Collections.RepeatedField<SparseTensorProto> SparseInitializer { get; }
Property Value
ValueInfo
Information for the values in the graph. The ValueInfoProto.name's
must be distinct. It is optional for a value to appear in value_info list.
Declaration
public Google.Protobuf.Collections.RepeatedField<ValueInfoProto> ValueInfo { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<ValueInfoProto> |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Clone()
Declaration
public GraphProto Clone()
Returns
Equals(GraphProto)
Declaration
public bool Equals(GraphProto other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Declaration
public void MergeFrom(Google.Protobuf.CodedInputStream input)
Parameters
Type |
Name |
Description |
Google.Protobuf.CodedInputStream |
input |
|
MergeFrom(GraphProto)
Declaration
public void MergeFrom(GraphProto other)
Parameters
ToString()
Declaration
public override string ToString()
Returns
WriteTo(Google.Protobuf.CodedOutputStream)
Declaration
public void WriteTo(Google.Protobuf.CodedOutputStream output)
Parameters
Type |
Name |
Description |
Google.Protobuf.CodedOutputStream |
output |
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.