bolv.model.backbone
class ConvBlock
Parameters
- input_channels: int
- output_channels: int
- kernel_size: int, default=3
- stride: int, default=1
- padding: int, default=1
- use_bias: bool, default=True
- use_batch_norm: bool, default=True
- use_max_pool: bool, default=True
- max_padding: int, default=0
- activation: callable, default=nn.Relu
Methods
forward(input, params=None)
Conduct the forward propagation procedure.
Parameters: .
-
input(Tensor) - The data input.
-
params(Tensor, default=None) - Patameters of this block which will be used in forward propagation.
class ResBlock
Parameters
- input_channels: int
- num_filters: int
- max_pool: bool
- max_padding: int
- normalization: bool, default=True
- use_bias: bool, default=False
Methods
forward(input, params=None)
Conduct the forward propagation procedure.
Parameters: .
-
input(Tensor) - The data input.
-
params(Tensor, default=None) - Patameters of this block which will be used in forward propagation.
class Conv
Parameters
- input_shape: List[int]
- ways: int
- num_stages: int, default=4
- num_filters: int, default=64
- kernel_size: int, default=3
- stride: int, default=1
- padding: int, default=1
- use_max_pool: bool, default=True
- max_padding: int, default=0
- use_batch_norm: bool, default=True
- use_head: bool, default=True
- activation: callable, default=nn.Relu
Variables
- ~Conv.block{i}(nn.Module) - the block composing the backbone network, i=1,2...num_stages
- ~Conv.head(nn.Linear, default=None) - one FC layer at the end of network
- ~Conv.num_stages(int) - the num of conv blocks
- ~Conv.output_shape(Tensor) - the shape of output tensor
Methods
forward(input)
Conduct the forward propagation procedure.
Parameters:
- input(Tensor) - The data input.
class Res12
Parameters
- input_shape: List[int]
- ways: int
- use_head: bool, default=True
Variables
- ~Conv.block{i}(nn.Module) - the block composing the backbone network, i=1,2,3,4
- ~Conv.head(nn.Linear, default=None) - one FC layer at the end of network
- ~Conv.output_shape(Tensor) - the shape of output tensor
Methods
forward(input)
Conduct the forward propagation procedure.
Parameters:
- input(Tensor) - The data input.