I was planning to make my decoder_nn like this:
self.decoder_nn = nn.Sequential(
                                      nn.ConvTranspose3d(16,8, prePoolDim,2,0), # <<<<< dimension <<<<<<<<<
                                      nn.BatchNorm3d(8),
                                      nn.ConvTranspose3d(8,16,4,2,0),
                                      nn.BatchNorm3d(16),
                                      nn.ConvTranspose3d(16,8,4,2,1)
                                      )

The output dimensions from this first ConvTranspose3d layer should essentially be 8xDimxDimxDim.
Since I’m only allowed self in def __init__(self), would the custom nn.Sequential module idea with multiple input args work? Also, as mentioned at the bottom of the post, I had this idea but wasn’t sure if it would work:
self.nn_1 = nn.Sequential( ... )
self.prePoolShape = list( x.size()) # <<<<<<<<<<
self.prePoolDim = prePoolShape[ 2 ] # <<<<<<<< 
self.nn_adpative_pool = nn.Sequential(...)
self.nn_2 = nn.Sequential(....)

self.mu & logvar_fc layers

self.decoder_nn = nn.Sequential( ... <using variable prePoolDim> ...)

Would this idea work? I had issues trying this because no variable x exists in the model but I wasn’t sure what to put in place of x.