dlpy.blocks.ResBlock¶
-
class
dlpy.blocks.
ResBlock
(kernel_sizes=3, n_filters=(16, 16), strides=None, batch_norm_first=False, conv_short_cut=False)¶ Bases: object
Base class for the residual blocks.
Parameters: - kernel_sizes : list-of-ints, optional
Specifies the size of the kernels. This assumes the kernels are square.
Default: 3- n_filters : list-of-ints, optional
Specifies the number of filters.
Default: (16, 16)- strides : list-of-ints, optional
Specifies the stride values for the filters
- batch_norm_first : bool, optional
Set to True, if the batch normalization comes first
Default: False- conv_short_cut : bool, optional
Set to True, if convolution layer has a short cut
Default: False
Returns: -
__init__
(kernel_sizes=3, n_filters=(16, 16), strides=None, batch_norm_first=False, conv_short_cut=False)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([kernel_sizes, n_filters, strides, …]) Initialize self. add_layers() Add the layers for the block compile(src_layer[, block_num]) Convert the block structure into DLPy layer definitions. count_instances() get_number_of_instances()