View Source ExVision.Model protocol (Ex Vision v0.4.0)
A protocol describing a generic ExVision model.
Summary
Types
A typespec definiting ExVision's model input, either as single model_input_t/0
or a list.
A type describing a single element that can be processed by ExVision's models
A generic type indicating a model output. For details on each model, refer to it's own output_t()
definition.
All the types that implement this protocol.
Functions
Function used to submit the input for inference in a process setting when the model is served as a process.
A function used to submit input for inference (inline variant).
Starts and links the module in process workflow
Types
@type input_t() :: model_input_t() | [model_input_t()]
A typespec definiting ExVision's model input, either as single model_input_t/0
or a list.
@type model_input_t() :: Path.t() | Nx.Tensor.t() | Vix.Vips.Image.t()
A type describing a single element that can be processed by ExVision's models
@type output_t() :: any()
A generic type indicating a model output. For details on each model, refer to it's own output_t()
definition.
@type t() :: term()
All the types that implement this protocol.
Functions
@spec as_serving(t()) :: Nx.Serving.t()
Function used to submit the input for inference in a process setting when the model is served as a process.
A function used to submit input for inference (inline variant).
@spec start_link( t(), keyword() ) :: GenServer.on_start()
Starts and links the module in process workflow