I tried this:
imageSize = [31 31 1];
encoderLayer1 = [
dlhdl.layer.sliceLayer(Name="slice",Groups=2,GroupID=2)
convolution2dLayer(3,32,"Padding",1,"WeightsInitializer","he","Name","conv1")
convolution2dLayer(3,32,"Padding",1,"WeightsInitializer","he","Name","conv3")
additionLayer(2,"Name","add");
];
encoderLayer2 = [
convolution2dLayer(3,32,"Padding",1,"WeightsInitializer","he","Name","conv2")];
layers = [imageInputLayer(inputSize, Normalization="none")
weightTyingEncoderLayer1(encoderLayer1,encoderLayer2)];
net = dlnetwork(layers);