class_docstr: MNIST decoder used in the Counterfactual with Reinforcement Learning experiments. The model consists of a fully
  connected layer of 128 units with ReLU activation followed by a convolutional block. The convolutional block
  consists fo 4 convolutional layers having 8, 8, 8  and 1 channels and a kernel size of 3. Each convolutional layer,
  except the last one, has ReLU nonlinearities and is followed by an upsampling layer of size 2. The final layers
  uses a sigmoid activation to clip the output values in [0, 1].
docstr: Forward pass.
  
  Parameters
  ----------
  x
      Input tensor.
  
  Returns
  -------
  Decoded input having each component in the interval [0, 1].
docstr_tok: ["Forward","pass",".","Parameters","--","--","--","--","--","x","Input","tensor",".","Returns","--","--","--","-","Decoded","input","having","each","component","in","the","interval","[","0",",","1","]","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """
      Forward pass.
  
      Parameters
      ----------
      x
          Input tensor.
  
      Returns
      -------
      Decoded input having each component in the interval [0, 1].
      """
      x = F.relu(self.fc1(x))
      x = x.view(x.shape[0], 8, 4, 4)
      x = self.up1(F.relu(self.conv1(x)))
      x = self.up2(F.relu(self.conv2(x)))
      x = self.up3(F.relu(self.conv3(x)))
      x = torch.sigmoid(self.conv4(x))
      return x
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from typing import List
  from alibi.models.pytorch.model import Model
label_desc: Use image node_id 2 for calling the MNISTDecoder obj's underlying member method code with example usage: obj.forward(x) and returns: x