wideresnet
BasicBlock
¶
Bases: Module
A Wide Residual Network Basic block.
This class creates a basic block.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
in_planes |
int
|
How many channels enter the block. |
required |
out_planes |
int
|
How many channels leave the block. |
required |
stride |
int
|
stride for convolution layer. |
required |
dropout |
float
|
Adds dropout if value is greater than 0.0. |
0.0
|
Source code in fastestimator/fastestimator/architecture/pytorch/wideresnet.py
NetworkBlock
¶
Bases: Module
A Wide Residual Network block.
This class utilizes the basic block to create a network block.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb_layers |
int
|
How many layers to create. |
required |
in_planes |
int
|
How many channels enter the block. |
required |
out_planes |
int
|
How many channels leave the block. |
required |
block |
BasicBlock
|
Class for creating a network block. |
required |
stride |
int
|
stride for convolution layer. |
required |
dropout |
float
|
Adds dropout if value is greater than 0.0. |
0.0
|
Source code in fastestimator/fastestimator/architecture/pytorch/wideresnet.py
WideResidualNetwork
¶
Bases: Module
Wide Residual Network.
This class creates the Wide Residual Network with specified parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
depth |
int
|
Depth of the network. Compute N = (n - 4) / 6. For a depth of 16, n = 16, N = (16 - 4) / 6 = 2 For a depth of 28, n = 28, N = (28 - 4) / 6 = 4 For a depth of 40, n = 40, N = (40 - 4) / 6 = 6 |
28
|
classes |
int
|
The number of outputs the model should generate. |
10
|
widen_factor |
int
|
Width of the network. |
10
|
dropout |
float
|
Adds dropout if value is greater than 0.0. |
0.0
|
Raises:
Type | Description |
---|---|
AssertionError
|
If (depth - 4) is not divisible by 6. |