dlpy.blocks.ResBlock

class dlpy.blocks.ResBlock(kernel_sizes=3, n_filters=16, 16, strides=None, batch_norm_first=False, conv_short_cut=False)

Base class for the residual blocks.

Parameters
kernel_sizeslist-of-ints, optional

Specifies the size of the kernels. This assumes the kernels are square. Default: 3

n_filterslist-of-ints, optional

Specifies the number of filters. Default: (16, 16)

strideslist-of-ints, optional

Specifies the stride values for the filters

batch_norm_firstbool, optional

Set to True, if the batch normalization comes first Default: False

conv_short_cutbool, optional

Set to True, if convolution layer has a short cut Default: False

Returns
ResBlock
__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()

Attributes

can_be_last_layer

number_of_instances

type

type_desc