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 |
|