You could use an interpolation (or cropping) to create equally sized activations in a similar manner as is currently being done with downsample in the resnet example.
Note that the optional downsampling  changed the number of channel, not the spatial size, so that you cannot copy the code directly.