I am running this code.
Not sure whether we need to register parameter?

  
      github.com
  
  
    hyqneuron/pytorch-avitm/blob/master/pytorch_model.py#L42 1

    self.register_buffer('prior_mean',    prior_mean)
    self.register_buffer('prior_var',     prior_var)
    self.register_buffer('prior_logvar',  prior_logvar)
    # initialize decoder weight
    if ac.init_mult != 0:
        #std = 1. / math.sqrt( ac.init_mult * (ac.num_topic + ac.num_input))
        self.decoder.weight.data.uniform_(0, ac.init_mult)
    # remove BN's scale parameters
    self.logvar_bn .register_parameter('weight', None)
    self.mean_bn   .register_parameter('weight', None)
    self.decoder_bn.register_parameter('weight', None)
    self.decoder_bn.register_parameter('weight', None)

def forward(self, input, compute_loss=False, avg_loss=True):
    # compute posterior
    en1 = F.softplus(self.en1_fc(input))                            # en1_fc   output
    en2 = F.softplus(self.en2_fc(en1))                              # encoder2 output
    en2 = self.en2_drop(en2)
    posterior_mean   = self.mean_bn  (self.mean_fc  (en2))          # posterior mean
    posterior_logvar = self.logvar_bn(self.logvar_fc(en2))          # posterior log variance
    posterior_var    = posterior_logvar.exp()