I have come across the script that belongs to a person in kaggle. The snippet is given below.
def bottleneck(x,filters_bottleneck,mode='cascade', depth=6,kernel_size=(3,3),activation='relu'):
dilated_layers = []
if mode == 'cascade':
for i in range(depth):
x = Conv2D(filters_bottleneck,kernel_size,activation=activation,padding='same',dilation_rate=2**i)(x)
dilated_layers.append(x)
return add(dilated_layers)
elif mode == 'parallel':
for i in range(depth):
dilated_layers.append(Conv2D(filters_bottleneck,kernel_size,
activation=activation,padding='same',dilation_rate=2**i)(x))
return add(dilated_layers)
To understand what the function bottleneck
does, A pictorial explanation is given below. The highlighted portion is the bottleneck. This part of the network is between the contracting and expanding paths.
The function bottleneck
accepts a parameter mode
. Am confused with the parameter mode
. Is the parameter mode
part of the vocabulary of deep learning, if so, can you help me by providing additional resources to understand. And the same applies to the cascade
in mode parameter too.