def InitializeNegPhase(self, to_pos=False):
    """Initialize negative particles.

    Copies the pos state and samples it to initialize the ngative particles.
    """
    for layer in self.layer:
      self.SetPhase(layer, pos=False)
      if to_pos:
        layer.state.assign(layer.pos_state)
      else:
        layer.ResetState(rand=True)
      layer.Sample()
      self.SetPhase(layer, pos=True)
Initialize negative particles.

    Copies the pos state and samples it to initialize the ngative particles.
    
deepnet/dbm.py