Annex v0.2.1 Annex.Layer behaviour View Source
The Annex.Layer is the module that defines types, callbacks, and helper for Layers.
By implementing the Layer behaviour a struct/model can be used along side other Layers to compose the layers of a deep neural network.
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: struct()
t() :: struct()
Link to this section Functions
Link to this function
backprop(layer, error, props)
View Source
backprop(layer, error, props)
View Source
backprop(struct(), any(), Annex.Layer.Backprop.t()) ::
{struct(), any(), Annex.Layer.Backprop.t()}
backprop(struct(), any(), Annex.Layer.Backprop.t()) :: {struct(), any(), Annex.Layer.Backprop.t()}
Link to this function
backward_shape(layer)
View Source
backward_shape(layer)
View Source
backward_shape(t()) :: Annex.Shape.t() | nil
backward_shape(t()) :: Annex.Shape.t() | nil
Link to this function
convert(layer, data, shape)
View Source
convert(layer, data, shape)
View Source
convert(t(), Annex.Data.data(), Annex.Shape.t()) :: Annex.Data.data()
convert(t(), Annex.Data.data(), Annex.Shape.t()) :: Annex.Data.data()
Link to this function
data_type(layer)
View Source
data_type(layer)
View Source
data_type(atom() | struct()) :: Annex.Data.type()
data_type(atom() | struct()) :: Annex.Data.type()
Link to this function
feedforward(layer, inputs) View Source
Link to this function
forward_shape(layer)
View Source
forward_shape(layer)
View Source
forward_shape(t()) :: Annex.Shape.t() | nil
forward_shape(t()) :: Annex.Shape.t() | nil
Link to this function
has_data_type?(module) View Source
Link to this function
has_shapes?(module) View Source
Link to this function
init_layer(cfg)
View Source
init_layer(cfg)
View Source
init_layer(Annex.LayerConfig.t(module())) :: t()
init_layer(Annex.LayerConfig.t(module())) :: t()
Link to this function
input_shape(layer) View Source
Link to this function
is_layer?(item) View Source
Link to this function
output_shape(layer) View Source
Link to this function
shapes(layer)
View Source
shapes(layer)
View Source
shapes(t()) :: {Annex.Shape.t(), Annex.Shape.t()}
shapes(t()) :: {Annex.Shape.t(), Annex.Shape.t()}
Link to this section Callbacks
Link to this callback
backprop(t, arg2, arg3)
View Source
backprop(t, arg2, arg3)
View Source
backprop(t(), Annex.Data.data(), Annex.Layer.Backprop.t()) ::
{t(), Annex.Data.data(), Annex.Layer.Backprop.t()}
backprop(t(), Annex.Data.data(), Annex.Layer.Backprop.t()) :: {t(), Annex.Data.data(), Annex.Layer.Backprop.t()}
Link to this callback
data_type(t)
View Source
(optional)
data_type(t)
View Source
(optional)
data_type(t()) :: Annex.Data.type()
data_type(t()) :: Annex.Data.type()
Link to this callback
feedforward(t, arg2)
View Source
feedforward(t, arg2)
View Source
feedforward(t(), Annex.Data.data()) :: {struct(), Annex.Data.data()}
feedforward(t(), Annex.Data.data()) :: {struct(), Annex.Data.data()}
Link to this callback
init_layer(arg1)
View Source
init_layer(arg1)
View Source
init_layer(Annex.LayerConfig.t(module())) :: t()
init_layer(Annex.LayerConfig.t(module())) :: t()
Link to this callback
shapes(t)
View Source
(optional)
shapes(t)
View Source
(optional)
shapes(t()) :: {Annex.Shape.t(), Annex.Shape.t()}
shapes(t()) :: {Annex.Shape.t(), Annex.Shape.t()}