Bottleneck
- class lib.model.networks.clip.Bottleneck(inplanes: int, planes: int, stride: int = 1, name: str = 'bottleneck')
Bases:
objectA ResNet bottleneck block that performs a sequence of convolutions, batch normalization, and ReLU activation operations on an input tensor.
- Parameters:
inplanes (int) – The number of input channels.
planes (int) – The number of output channels.
stride (int, optional) – The stride of the bottleneck block. Default: 1
name (str, optional) – The name of the bottleneck block. Default: “bottleneck”
Attributes Summary
The factor by which the number of input channels is expanded to get the number of output channels.
Methods Summary
__call__(inputs)Performs the forward pass for a Bottleneck block.
Attributes Documentation
- expansion = 4
The factor by which the number of input channels is expanded to get the number of output channels.
- Type:
int
Methods Documentation
- __call__(inputs: KerasTensor) KerasTensor
Performs the forward pass for a Bottleneck block.
All conv layers have stride 1. an avgpool is performed after the second convolution when stride > 1
- Parameters:
inputs (
keras.KerasTensor) – The input tensor to the Bottleneck block.- Returns:
The result of the forward pass through the Bottleneck block.
- Return type:
keras.KerasTensor
- __call__(inputs: KerasTensor) KerasTensor
Performs the forward pass for a Bottleneck block.
All conv layers have stride 1. an avgpool is performed after the second convolution when stride > 1
- Parameters:
inputs (
keras.KerasTensor) – The input tensor to the Bottleneck block.- Returns:
The result of the forward pass through the Bottleneck block.
- Return type:
keras.KerasTensor
- expansion = 4
The factor by which the number of input channels is expanded to get the number of output channels.
- Type:
int