Can you elaborate more on what you mean by registering the encoder and decoder in the parent class? Also, I corrected another mistake in the above snippet about how the output view is changed and “softmaxed” before being returned so that it is suitable for error calculation. Sorry about the mistake in the original post.