class_docstr: Parameterizes the gaussian latent transition probability `p(z_t | z_{t-1})`
  See section 5 in the reference for comparison.
class_docstr_tok: ["Parameterizes","the","gaussian","latent","transition","probability","`","p","(","z_t","|","z_","{","t-1","}",")","`","See","section","5","in","the","reference","for","comparison","."]
code: def __init__(self, z_dim, transition_dim):
      super().__init__()
      # initialize the six linear transformations used in the neural network
      self.lin_gate_z_to_hidden = nn.Linear(z_dim, transition_dim)
      self.lin_gate_hidden_to_z = nn.Linear(transition_dim, z_dim)
      self.lin_proposed_mean_z_to_hidden = nn.Linear(
          z_dim, transition_dim
      )
      self.lin_proposed_mean_hidden_to_z = nn.Linear(
          transition_dim, z_dim
      )
      self.lin_sig = nn.Linear(z_dim, z_dim)
      self.lin_z_to_loc = nn.Linear(z_dim, z_dim)
      # modify the default initialization of lin_z_to_loc
      # so that it's starts out as the identity function
      self.lin_z_to_loc.weight.data = torch.eye(z_dim)
      self.lin_z_to_loc.bias.data = torch.zeros(z_dim)
      # initialize the three non-linearities used in the neural network
      self.relu = nn.ReLU()
      self.softplus = nn.Softplus()
  
imports: import argparse
  import logging
  import time
  from os.path import exists
  import numpy
  import torch
  import torch.nn
  import pyro
  import pyro.contrib.examples.polyphonic_data_loader
  import pyro.distributions
  import pyro.poutine
  from pyro.distributions import TransformedDistribution
  from pyro.distributions.transforms import affine_autoregressive
  from pyro.infer import SVI, JitTrace_ELBO, Trace_ELBO, TraceEnum_ELBO, TraceTMC_ELBO, config_enumerate
  from pyro.optim import ClippedAdam
label_desc: Use image node_id 1 to create a new GatedTransition object from inherited base classes: nn with example: obj = GatedTransition(z_dim, transition_dim)