original_docstring: Annealing schedule for prior KL term (beta annealing).
docstring: Annealing schedule for prior KL term (beta annealing).
docstring_tokens: Annealing schedule for prior KL term ( beta annealing ) .
code: def _beta_anneal(self, step, batch_size, data_size, anneal_length):
          """Annealing schedule for prior KL term (beta annealing)."""
          if np.allclose(anneal_length, 0.0):
              return torch.tensor(1.0)
          anneal_frac = step * batch_size / (anneal_length * data_size)
          return torch.tensor(min([anneal_frac, 1.0]))
code_tokens: def _beta_anneal ( self , step , batch_size , data_size , anneal_length ) : if np . allclose ( anneal_length , 0.0 ) : return torch . tensor ( 1.0 ) anneal_frac = step * batch_size / ( anneal_length * data_size ) return torch . tensor ( min ( [ anneal_frac , 1.0 ] ) )
short_docstring: Annealing schedule for prior KL term (beta annealing).
short_docstring_tokens: Annealing schedule for prior KL term ( beta annealing ) .
comment: """Annealing schedule for prior KL term (beta annealing)."""