How to build network with custom connectivity in autoencoder?

For example, in the figure my input is time series values [week_index, hour_index, values]. I want my output d only get weekly information and e only contains weekly and hourly information, while in f it will have all information. But if I use the built-in fully-connected network, the output d,e,f will all get [week, hour, value] information. Is there any way to do that in PyTorch? There could be extra 1 or 2 layers between input and output.