I’m not sure how _Denseblock is defined, but assuming you are using nn.Conv3d layers, this line might be the issue:
self.features.add_module('norm5', nn.BatchNorm2d(num_features))

Should this be BatchNorm2d or rather BatchNorm3d?
Or is the transition layer flattening your output already?