BB.Inference.Description (bb_inference v0.1.0)

Copy Markdown View Source

What a runtime could find out about a loaded model: its inputs and outputs, in the order the model declares them.

Order matters. Two outputs can share a shape and a type - an SSD's classes and scores are both {1, N} floats - and then their position is the only thing that tells them apart.

Every field a runtime cannot report is nil, never guessed. A dimension the model leaves dynamic is nil inside the shape.

Summary

Functions

A one-line summary for error messages: inputs images {1, 3, 416, 416} f32; outputs output {1, 3549, 85} f32.

Types

t()

@type t() :: %BB.Inference.Description{
  inputs: [BB.Inference.Description.Tensor.t()],
  outputs: [BB.Inference.Description.Tensor.t()]
}

Functions

summary(description)

@spec summary(t()) :: String.t()

A one-line summary for error messages: inputs images {1, 3, 416, 416} f32; outputs output {1, 3549, 85} f32.