% Residual block
function layers = residualBlock(numChannels,filterSize,numGroups,name)
layers = [
    groupNormalizationLayer(numGroups,Name="norm1Res_"+name)
    swishLayer()
    convolution2dLayer(filterSize,numChannels,Padding="same")
    functionLayer(@(x,y) x + y,Formattable=true,Name="addEmbedRes_"+name)
    groupNormalizationLayer(numGroups)
    swishLayer()
    convolution2dLayer(filterSize,numChannels,Padding="same")
    additionLayer(2,Name="addRes_"+name)
    ];
end