final case class ModelProto(irVersion: Option[Long] = _root_.scala.None, opsetImport: Seq[OperatorSetIdProto] = _root_.scala.Seq.empty, producerName: Option[String] = _root_.scala.None, producerVersion: Option[String] = _root_.scala.None, domain: Option[String] = _root_.scala.None, modelVersion: Option[Long] = _root_.scala.None, docString: Option[String] = _root_.scala.None, graph: Option[GraphProto] = _root_.scala.None, metadataProps: Seq[StringStringEntryProto] = _root_.scala.Seq.empty, trainingInfo: Seq[TrainingInfoProto] = _root_.scala.Seq.empty, functions: Seq[FunctionProto] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[ModelProto] with Product with Serializable
Models
ModelProto is a top-level file/container format for bundling a ML model and associating its computation graph with metadata.
The semantics of the model are described by the associated GraphProto's.
- irVersion
The version of the IR this model targets. See Version enum above. This field MUST be present.
- opsetImport
The OperatorSets this model relies on. All ModelProtos MUST have at least one entry that specifies which version of the ONNX OperatorSet is being imported. All nodes in the ModelProto's graph will bind against the operator with the same-domain/same-op_type operator with the HIGHEST version in the referenced operator sets.
- producerName
The name of the framework or tool used to generate this model. This field SHOULD be present to indicate which implementation/tool/framework emitted the model.
- producerVersion
The version of the framework or tool used to generate this model. This field SHOULD be present to indicate which implementation/tool/framework emitted the model.
- domain
Domain name of the model. We use reverse domain names as name space indicators. For example:
com.facebook.fair
orcom.microsoft.cognitiveservices
Together withmodel_version
and GraphProto.name, this forms the unique identity of the graph.- modelVersion
The version of the graph encoded. See Version enum below.
- docString
A human-readable documentation for this model. Markdown is allowed.
- graph
The parameterized graph that is evaluated to execute the model.
- metadataProps
Named metadata values; keys should be distinct.
- trainingInfo
Training-specific information. Sequentially executing all stored
TrainingInfoProto.algorithm
s and assigning their outputs following the correspondingTrainingInfoProto.update_binding
s is one training iteration. Similarly, to initialize the model (as if training hasn't happened), the user should sequentially execute all storedTrainingInfoProto.initialization
s and assigns their outputs usingTrainingInfoProto.initialization_binding
s. If this field is empty, the training behavior of the model is undefined.- functions
A list of function protos local to the model. Name of the function "FunctionProto.name" should be unique within the domain "FunctionProto.domain". In case of any conflicts the behavior (whether the model local functions are given higher priority, or standard opserator sets are given higher priotity or this is treated as error) is defined by the runtimes. The operator sets imported by FunctionProto should be compatible with the ones imported by ModelProto and other model local FunctionProtos. Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto or by 2 FunctionProtos then versions for the operator set may be different but, the operator schema returned for op_type, domain, version combination for both the versions should be same for every node in the function body. One FunctionProto can reference other FunctionProto in the model, however, recursive reference is not allowed.
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- ModelProto
- Updatable
- GeneratedMessage
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ModelProto(irVersion: Option[Long] = _root_.scala.None, opsetImport: Seq[OperatorSetIdProto] = _root_.scala.Seq.empty, producerName: Option[String] = _root_.scala.None, producerVersion: Option[String] = _root_.scala.None, domain: Option[String] = _root_.scala.None, modelVersion: Option[Long] = _root_.scala.None, docString: Option[String] = _root_.scala.None, graph: Option[GraphProto] = _root_.scala.None, metadataProps: Seq[StringStringEntryProto] = _root_.scala.Seq.empty, trainingInfo: Seq[TrainingInfoProto] = _root_.scala.Seq.empty, functions: Seq[FunctionProto] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = ...)
- irVersion
The version of the IR this model targets. See Version enum above. This field MUST be present.
- opsetImport
The OperatorSets this model relies on. All ModelProtos MUST have at least one entry that specifies which version of the ONNX OperatorSet is being imported. All nodes in the ModelProto's graph will bind against the operator with the same-domain/same-op_type operator with the HIGHEST version in the referenced operator sets.
- producerName
The name of the framework or tool used to generate this model. This field SHOULD be present to indicate which implementation/tool/framework emitted the model.
- producerVersion
The version of the framework or tool used to generate this model. This field SHOULD be present to indicate which implementation/tool/framework emitted the model.
- domain
Domain name of the model. We use reverse domain names as name space indicators. For example:
com.facebook.fair
orcom.microsoft.cognitiveservices
Together withmodel_version
and GraphProto.name, this forms the unique identity of the graph.- modelVersion
The version of the graph encoded. See Version enum below.
- docString
A human-readable documentation for this model. Markdown is allowed.
- graph
The parameterized graph that is evaluated to execute the model.
- metadataProps
Named metadata values; keys should be distinct.
- trainingInfo
Training-specific information. Sequentially executing all stored
TrainingInfoProto.algorithm
s and assigning their outputs following the correspondingTrainingInfoProto.update_binding
s is one training iteration. Similarly, to initialize the model (as if training hasn't happened), the user should sequentially execute all storedTrainingInfoProto.initialization
s and assigns their outputs usingTrainingInfoProto.initialization_binding
s. If this field is empty, the training behavior of the model is undefined.- functions
A list of function protos local to the model. Name of the function "FunctionProto.name" should be unique within the domain "FunctionProto.domain". In case of any conflicts the behavior (whether the model local functions are given higher priority, or standard opserator sets are given higher priotity or this is treated as error) is defined by the runtimes. The operator sets imported by FunctionProto should be compatible with the ones imported by ModelProto and other model local FunctionProtos. Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto or by 2 FunctionProtos then versions for the operator set may be different but, the operator schema returned for op_type, domain, version combination for both the versions should be same for every node in the function body. One FunctionProto can reference other FunctionProto in the model, however, recursive reference is not allowed.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllFunctions(__vs: Iterable[FunctionProto]): ModelProto
- def addAllMetadataProps(__vs: Iterable[StringStringEntryProto]): ModelProto
- def addAllOpsetImport(__vs: Iterable[OperatorSetIdProto]): ModelProto
- def addAllTrainingInfo(__vs: Iterable[TrainingInfoProto]): ModelProto
- def addFunctions(__vs: FunctionProto*): ModelProto
- def addMetadataProps(__vs: StringStringEntryProto*): ModelProto
- def addOpsetImport(__vs: OperatorSetIdProto*): ModelProto
- def addTrainingInfo(__vs: TrainingInfoProto*): ModelProto
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearDocString: ModelProto
- def clearDomain: ModelProto
- def clearFunctions: ModelProto
- def clearGraph: ModelProto
- def clearIrVersion: ModelProto
- def clearMetadataProps: ModelProto
- def clearModelVersion: ModelProto
- def clearOpsetImport: ModelProto
- def clearProducerName: ModelProto
- def clearProducerVersion: ModelProto
- def clearTrainingInfo: ModelProto
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
companion: ModelProto.type
- Definition Classes
- ModelProto → GeneratedMessage
- def discardUnknownFields: ModelProto
- val docString: Option[String]
- val domain: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val functions: Seq[FunctionProto]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getDocString: String
- def getDomain: String
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- ModelProto → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- ModelProto → GeneratedMessage
- def getGraph: GraphProto
- def getIrVersion: Long
- def getModelVersion: Long
- def getProducerName: String
- def getProducerVersion: String
- val graph: Option[GraphProto]
- val irVersion: Option[Long]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val metadataProps: Seq[StringStringEntryProto]
- val modelVersion: Option[Long]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val opsetImport: Seq[OperatorSetIdProto]
- val producerName: Option[String]
- val producerVersion: Option[String]
-
def
serializedSize: Int
- Definition Classes
- ModelProto → GeneratedMessage
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
-
final
def
toByteString: ByteString
- Definition Classes
- GeneratedMessage
-
final
def
toPMessage: PMessage
- Definition Classes
- GeneratedMessage
-
def
toProtoString: String
- Definition Classes
- ModelProto → GeneratedMessage
- val trainingInfo: Seq[TrainingInfoProto]
- val unknownFields: UnknownFieldSet
-
def
update(ms: (Lens[ModelProto, ModelProto]) ⇒ Mutation[ModelProto]*): ModelProto
- Definition Classes
- Updatable
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def withDocString(__v: String): ModelProto
- def withDomain(__v: String): ModelProto
- def withFunctions(__v: Seq[FunctionProto]): ModelProto
- def withGraph(__v: GraphProto): ModelProto
- def withIrVersion(__v: Long): ModelProto
- def withMetadataProps(__v: Seq[StringStringEntryProto]): ModelProto
- def withModelVersion(__v: Long): ModelProto
- def withOpsetImport(__v: Seq[OperatorSetIdProto]): ModelProto
- def withProducerName(__v: String): ModelProto
- def withProducerVersion(__v: String): ModelProto
- def withTrainingInfo(__v: Seq[TrainingInfoProto]): ModelProto
- def withUnknownFields(__v: UnknownFieldSet): ModelProto
-
final
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- ModelProto → GeneratedMessage
-
final
def
writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated