View Source ExVision.StyleTransfer.UdnieFast (Ex Vision v0.4.0)

Elixir.ExVision.StyleTransfer.UdnieFast is a custom style transfer model optimised for devices with low computational capabilities and CPU inference.

Summary

Types

A type consisting of output tesnor (stylized image tensor) from style transfer models of shape {400, 300, 3}.

t()

An instance of the Elixir.ExVision.StyleTransfer.UdnieFast

Functions

Submits the input for inference to the process running the Nx.Serving for this model.

Creates the model instance

Same as load/1, but raises and error on failure.

Immediatelly applies the model to the given input, in the scope of the current process.

Types

@type output_t() :: Nx.Tensor.t()

A type consisting of output tesnor (stylized image tensor) from style transfer models of shape {400, 300, 3}.

@opaque t()

An instance of the Elixir.ExVision.StyleTransfer.UdnieFast

Functions

Link to this function

batched_run(name \\ __MODULE__, input)

View Source
@spec batched_run(atom(), ExVision.Model.input_t()) :: output_t() | [output_t()]

Submits the input for inference to the process running the Nx.Serving for this model.

@spec load([ExVision.Model.Definition.Ortex.load_option_t()]) ::
  {:ok, t()} | {:error, reason :: atom()}

Creates the model instance

@spec load!(keyword()) :: t()

Same as load/1, but raises and error on failure.

@spec run(t(), ExVision.Model.input_t()) :: output_t() | [output_t()]

Immediatelly applies the model to the given input, in the scope of the current process.