def _reset_parameters(self): xavier_uniform_fan_in_(self.in_proj.weight) xavier_uniform_fan_in_(self.out_proj.weight) if self.in_proj.bias is not None: nn.init.zeros_(self.in_proj.bias) if self.out_proj.bias is not None: nn.init.zeros_(self.out_proj.bias)
def _reset_parameters(self): if hasattr(self, "bow_proj_layer"): xavier_uniform_fan_in_(self.bow_proj_layer.weight) nn.init.zeros_(self.bow_proj_layer.bias) xavier_uniform_fan_in_(self.emb2states_fwd.weight) xavier_uniform_fan_in_(self.emb2states_bwd.weight) nn.init.zeros_(self.emb2states_fwd.bias) nn.init.zeros_(self.emb2states_bwd.bias) if hasattr(self, "fwd_out_proj"): xavier_uniform_fan_in_(self.fwd_out_proj.weight) if hasattr(self, "bwd_out_proj"): xavier_uniform_fan_in_(self.bwd_out_proj.weight)
def _reset_parameters(self): xavier_uniform_fan_in_(self.linear.weight, activation="tanh")
def _reset_parameters(self): xavier_uniform_fan_in_(self.hidden2latent.weight) nn.init.zeros_(self.hidden2latent.bias)
def _reset_parameters(self): xavier_uniform_fan_in_(self.in_proj.weight) nn.init.zeros_(self.in_proj.bias) xavier_uniform_fan_in_(self.out_proj.weight, activation="relu") nn.init.zeros_(self.out_proj.bias)
def _reset_parameters(self): xavier_uniform_fan_in_(self.in_proj.weight) xavier_uniform_fan_in_(self.out_proj.weight, activation="tanh")
def _reset_parameters(self): xavier_uniform_fan_in_(self.input_transform.weight) nn.init.orthogonal_(self.states_transform.weight) if self.use_bias: nn.init.zeros_(self.input_transform.bias) nn.init.zeros_(self.states_transform.bias)
def _reset_parameters(self): xavier_uniform_fan_in_(self.weight_ih) nn.init.orthogonal_(self.weight_hh) if self.bias: nn.init.zeros_(self.bias_ih) nn.init.zeros_(self.bias_hh)
def _reset_parameters(self): if not self.opts.weight_typing: xavier_uniform_fan_in_(self.out_proj.weight)
def _reset_parameters(self): if hasattr(self, "bow_proj_layer"): xavier_uniform_fan_in_(self.bow_proj_layer.weight) nn.init.zeros_(self.bow_proj_layer.bias) if not self.opts.weight_typing: xavier_uniform_fan_in_(self.out_proj.weight)
def _reset_parameters(self): if self.embedding_dim != self.latent_dim: xavier_uniform_fan_in_(self.latent2emb.weight) nn.init.zeros_(self.latent2emb.bias)
def _reset_parameters(self): if self.empty_base: return if isinstance(self.out_proj, nn.Linear): xavier_uniform_fan_in_(self.out_proj.weight)