示例#1
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)
示例#2
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,
     )
示例#3
0
    def __init__(self,
                 device,
                 name,
                 edge_dimension,
                 meta_data_dimension,
                 decimator_dimension,
                 mem_hidden_dimension,
                 agg_hidden_dimension,
                 mem_agg_hidden_dimension,
                 prediction_dimension,
                 variable_classifier=None,
                 function_classifier=None,
                 dropout=0,
                 local_search_iterations=0,
                 epsilon=0.05):

        super(NeuralSurveyPropagatorSolver, self).__init__(
            device=device,
            name=name,
            propagator=pdp_propagate.SurveyPropagator(device,
                                                      decimator_dimension,
                                                      include_adaptors=True),
            decimator=pdp_decimate.NeuralDecimator(
                device, (3, 2), meta_data_dimension, decimator_dimension,
                mem_hidden_dimension, mem_agg_hidden_dimension,
                agg_hidden_dimension, edge_dimension, dropout),
            predictor=pdp_predict.NeuralPredictor(
                device, decimator_dimension, prediction_dimension,
                edge_dimension, meta_data_dimension, mem_hidden_dimension,
                agg_hidden_dimension, mem_agg_hidden_dimension,
                variable_classifier, function_classifier),
            local_search_iterations=local_search_iterations,
            epsilon=epsilon)