Dense¶
- class
dragon.vm.tensorlayer.layers.
Dense
(
n_units,
act=None,
W_init='glorot_uniform',
b_init='zeros',
in_channels=None,
name=None
)[source]¶ Fully connected layer.
Examples:
# Define and call a dense layer with the input input = tl.layers.Input([100, 50]) output = tl.layers.Dense(n_units=800)(input)
__init__¶
Dense.
__init__
(
n_units,
act=None,
W_init='glorot_uniform',
b_init='zeros',
in_channels=None,
name=None
)[source]¶Create a
Dense
layer.- Parameters:
- n_units (int, required) – The number of output units.
- act (callable, optional) – The optional activation function.
- W_init (Union[callable, str], optional) – The initializer for weight matrix.
- b_init (Union[callable, str], optional) – The initializer for bias vector.
- in_channels (int, optional) – The number of input units.
- name (str, optional) – The layer name.