Exemplo n.º 1
0
 def __init__(
     self,
     device,
     name,
     pi=0.1,
     decimation_probability=0.5,
     local_search_iterations=0,
     epsilon=0.05,
 ):
     super(ReinforceSurveyPropagatorSolver, self).__init__(
         device=device,
         name=name,
         propagator=pdp_propagate.SurveyPropagator(
             device, decimator_dimension=1, include_adaptors=False, pi=pi
         ),
         decimator=pdp_decimate.ReinforceDecimator(
             device,
             scorer=pdp_predict.SurveyScorer(
                 device, message_dimension=1, include_adaptors=False, pi=pi
             ),
             decimation_probability=decimation_probability,
         ),
         predictor=pdp_predict.ReinforcePredictor(device=device),
         local_search_iterations=local_search_iterations,
         epsilon=epsilon,
     )
Exemplo n.º 2
0
    def __init__(self,
                 device,
                 name,
                 tolerance,
                 t_max,
                 local_search_iterations=0,
                 epsilon=0.05):

        super(SurveyPropagatorSolver, self).__init__(
            device=device,
            name=name,
            propagator=pdp_propagate.SurveyPropagator(device,
                                                      decimator_dimension=1,
                                                      include_adaptors=False),
            decimator=pdp_decimate.SequentialDecimator(
                device,
                message_dimension=(3, 1),
                scorer=pdp_predict.SurveyScorer(device,
                                                message_dimension=1,
                                                include_adaptors=False),
                tolerance=tolerance,
                t_max=t_max),
            predictor=pdp_predict.IdentityPredictor(device=device,
                                                    random_fill=True),
            local_search_iterations=local_search_iterations,
            epsilon=epsilon)