class_docstr: Decoder part of the VAE. Reverses Encoder.
  
  :param shape: Shape of output: (channels, height, width).
  :param nhid: Dimension of input.
class_docstr_tok: ["Decoder","part","of","the","VAE",".","Reverses","Encoder",".",":","param","shape",":","Shape","of","output",":","(","channels",",","height",",","width",")",".",":","param","nhid",":","Dimension","of","input","."]
code: def __init__(self, shape, nhid=16):
      super(VAEMLPDecoder, self).__init__()
      flattened_size = torch.Size(shape).numel()
      self.shape = shape
      self.decode = nn.Sequential(
          MLP(
              [nhid, 64, 128, 256, flattened_size],
              last_activation=False,
          ),
          nn.Sigmoid(),
      )
      self.invTrans = transforms.Compose(
          [transforms.Normalize((0.1307,), (0.3081,))]
      )
  
imports: from abc import abstractmethod
  from typing import Union
  from matplotlib import transforms
  import torch
  import torch.nn
  from torchvision import transforms
  from avalanche.models.utils import MLP, Flatten
  from avalanche.models.base_model import BaseModel
label_desc: Use image node_id 1 to create a new VAEMLPDecoder object from inherited base classes: nn with example: obj = VAEMLPDecoder(shape, nhid)