Class for the residual block layer.
More...
|
|
def | __init__ (self, ninput, noutput, upsample=True) |
| | Constructor to create a new residual block layer.
|
| |
| def | forward (self, x) |
| | Function to perform a forward pass. More...
|
| |
|
|
| upsample |
| | Whether to double the height and width of input.
|
| |
|
| conv |
| | Convolutional layer in the shortcut branch.
|
| |
|
| norm1 |
| | First batch normalization layer in the residual branch.
|
| |
|
| conv1 |
| | First convolutional layer in the residual branch.
|
| |
|
| norm2 |
| | Second batch normalization layer in the residual branch.
|
| |
|
| conv2 |
| | Second convolutional layer in the residual branch.
|
| |
Class for the residual block layer.
Residual block layer.
Definition at line 19 of file resnet.py.
◆ forward()
Function to perform a forward pass.
Compute the layer output for a given input.
Definition at line 39 of file resnet.py.
40 """Compute the layer output for a given input."""
46 h = F.interpolate(h, mode=
"nearest", scale_factor=2)
53 x = F.interpolate(x, mode=
"nearest", scale_factor=2)
The documentation for this class was generated from the following file:
- pxd/scripts/pxd/background_generator/models/resnet.py