deepr.layers.Select
- class deepr.layers.Select(inputs=None, outputs=None, indices=None, n_in=None)[source]
Layer to extract inputs / outputs from previous layers
The
Select
layer is particularly useful when defining arbitrary DAGs of layers : it is a convenient way to select which nodes should be inputs, and which should be outputs. For example:layer = deepr.layers.Select(inputs=("x", "y"), outputs="z", n_in=2, indices=1) layer((1, 2)) # 2 layer({"x": 1, "y": 2}) # {"z": 2}
See
DAG
documentation for more precisions.Methods
__init__
([inputs, outputs, indices, n_in])forward
(tensors[, mode])Forward method of the layer
forward_as_dict
(tensors[, mode])Forward method on a dictionary of Tensors.