ModelProto

onnx.onnx.ModelProto
See theModelProto companion object
final case class ModelProto(irVersion: Option[Long], opsetImport: Seq[OperatorSetIdProto], producerName: Option[String], producerVersion: Option[String], domain: Option[String], modelVersion: Option[Long], docString: Option[String], graph: Option[GraphProto], metadataProps: Seq[StringStringEntryProto], trainingInfo: Seq[TrainingInfoProto], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ModelProto]

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.

Value parameters

docString

A human-readable documentation for this model. Markdown is allowed.

domain

Domain name of the model. We use reverse domain names as name space indicators. For example: com.facebook.fair or com.microsoft.cognitiveservices Together with model_version and GraphProto.name, this forms the unique identity of the graph.

graph

The parameterized graph that is evaluated to execute the model.

irVersion

The version of the IR this model targets. See Version enum above. This field MUST be present.

metadataProps

Named metadata values; keys should be distinct.

modelVersion

The version of the graph encoded. See Version enum below.

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.

trainingInfo

Training-specific information. Sequentially executing all stored TrainingInfoProto.algorithms and assigning their outputs following the corresponding TrainingInfoProto.update_bindings is one training iteration. Similarly, to initialize the model (as if training hasn't happened), the user should sequentially execute all stored TrainingInfoProto.initializations and assigns their outputs using TrainingInfoProto.initialization_bindings. If this field is empty, the training behavior of the model is undefined.

Attributes

Companion
object
Graph
Supertypes
trait Updatable[ModelProto]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def companion: ModelProto.type
def getDocString: String
def getDomain: String
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
def getIrVersion: Long
def getModelVersion: Long
def getProducerName: String
def getProducerVersion: String
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

def withDocString(`__v`: String): ModelProto
def withDomain(`__v`: String): ModelProto
def withIrVersion(`__v`: Long): ModelProto
def withModelVersion(`__v`: Long): ModelProto
def withProducerName(`__v`: String): ModelProto
def withProducerVersion(`__v`: String): ModelProto
def withUnknownFields(`__v`: UnknownFieldSet): ModelProto
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
def update(ms: Lens[ModelProto, ModelProto] => () => ModelProto*): A

Attributes

Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage