MLP
MLP
Bases: BaseBackbone
Source code in sequel/backbones/pytorch/mlp.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
__init__(width, n_hidden_layers, dropout=None, num_classes=10, *args, **kwargs)
A Multi-Layer Peceptron of n_hidden_layers
, each of which has width
neurons. This class is used as the
encoder for the SharedBottom architecture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_hidden_layers |
int
|
Number of hidden layers |
required |
width |
int
|
Width of (all) hidden layers |
required |
dropout |
Optional[float]
|
If set, the model includes a dropout layer after every Linear with probability equal to the set value. Defaults to None. |
None
|
Source code in sequel/backbones/pytorch/mlp.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|