ab.hlayers¶
Higher-order neural network layers (made from other layers).
-
class
aboleth.hlayers.
Concat
(*layers)¶ Bases:
aboleth.baselayers.MultiLayer
Concatenates the output of multiple layers.
Parameters: layers ([MultiLayer]) – The layers to concatenate. -
__call__
(**kwargs)¶ Construct the subgraph for this layer.
Parameters: **kwargs – the inputs to this layer (Tensors) Returns: - Net (Tensor) – the output of this layer
- KL (float, Tensor) – the regularizer/Kullback Leibler ‘cost’ of the parameters in this layer.
-
-
class
aboleth.hlayers.
PerFeature
(*layers)¶ Bases:
aboleth.baselayers.Layer
Concatenate multiple layers with sliced inputs.
Each layer will recieve a slice along the last axis of the input to the new function. In other words,
PerFeature(l1, l2)(X)
will calll1(X[..., 0]) and l2(X[..., 1])
then concatenate their outputs into a single tensor. This is mostly useful for simplifying embedding multiple categorical inputs that are stored columnwise in the same 2D tensor.This function assumes the tensor being provided is 3D.
Parameters: layers ([Layer]) – The layers to concatenate. -
__call__
(X)¶ Construct the subgraph for this layer.
Parameters: X (Tensor) – the input to this layer Returns: - Net (Tensor) – the output of this layer
- KL (float, Tensor) – the regularizer/Kullback Leibler ‘cost’ of the parameters in this layer.
-
-
class
aboleth.hlayers.
Sum
(*layers)¶ Bases:
aboleth.baselayers.MultiLayer
Sums multiple layers by adding their outputs.
Parameters: layers ([MultiLayer]) – The layers to add. -
__call__
(**kwargs)¶ Construct the subgraph for this layer.
Parameters: **kwargs – the inputs to this layer (Tensors) Returns: - Net (Tensor) – the output of this layer
- KL (float, Tensor) – the regularizer/Kullback Leibler ‘cost’ of the parameters in this layer.
-