package caisar

  1. Overview
  2. Docs

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.

type t = {
  1. node : NodeProto.t list;
    (*

    The nodes in the graph, sorted topologically.

    *)
  2. name : string option;
    (*

    The name of the graph.

    namespace Graph

    *)
  3. initializer' : TensorProto.t list;
    (*

    A list of named tensor values, used to specify constant inputs of the graph. Each initializer (both TensorProto as well SparseTensorProto) MUST have a name. The name MUST be unique across both initializer and sparse_initializer, but the name MAY also appear in the input list.

    *)
  4. doc_string : string option;
    (*

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

    *)
  5. input : ValueInfoProto.t list;
    (*

    The inputs and outputs of the graph.

    *)
  6. output : ValueInfoProto.t list;
  7. value_info : ValueInfoProto.t list;
    (*

    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.

    *)
  8. quantization_annotation : TensorAnnotation.t list;
    (*

    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.

    *)
  9. sparse_initializer : SparseTensorProto.t list;
    (*

    Initializers (see above) stored in sparse format.

    *)
}
val make : ?node:NodeProto.t list -> ?name:string -> ?initializer':TensorProto.t list -> ?doc_string:string -> ?input:ValueInfoProto.t list -> ?output:ValueInfoProto.t list -> ?value_info:ValueInfoProto.t list -> ?quantization_annotation:TensorAnnotation.t list -> ?sparse_initializer:SparseTensorProto.t list -> unit -> t

Helper function to generate a message using default values

Serialize the message to binary format

Deserialize from binary format

Serialize to Json (compatible with Yojson.Basic.t)

Deserialize from Json (compatible with Yojson.Basic.t)

val name : unit -> string

Fully qualified protobuf name of this message

OCaml

Innovation. Community. Security.