'Perform the positive phase.
This method computes the sufficient statistics under the data distribution.'

def PositivePhase(self, train=False, evaluate=False, step=0):

    if self.initializer_net:
        self.initializer_net.ForwardPropagate(train=train, step=step)
    for node in self.node_list:
        if node.is_input:
            self.ComputeUp(node, train=train)
        elif node.is_initialized:
            node.state.assign(node.initialization_source.state)
        else:
            node.ResetState(rand=False)
    for i in range(self.net.hyperparams.mf_steps):
        for node in self.pos_phase_order:
            self.ComputeUp(node, train=train, step=step, maxsteps=self.train_stop_steps)
    losses = []
    if train:
        for node in self.layer:
            r = node.CollectSufficientStatistics()
            if (r is not None):
                perf = deepnet_pb2.Metrics()
                perf.MergeFrom(node.proto.performance_stats)
                perf.count = 1
                perf.sparsity = r
                losses.append(perf)
        for edge in self.edge:
            edge.CollectSufficientStatistics()
    if ((not self.cd) or evaluate):
        for node in self.input_datalayer:
            self.ComputeUp(node, compute_input=True, step=step, maxsteps=self.train_stop_steps)
            losses.append(node.GetLoss())
    return losses
