Example #1
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)
Example #2
0
 def __init__(
     self,
     device,
     name,
     edge_dimension,
     meta_data_dimension,
     propagator_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(NeuralPropagatorDecimatorSolver, self).__init__(
         device=device,
         name=name,
         propagator=pdp_propagate.NeuralMessagePasser(
             device,
             edge_dimension,
             decimator_dimension,
             meta_data_dimension,
             propagator_dimension,
             mem_hidden_dimension,
             mem_agg_hidden_dimension,
             agg_hidden_dimension,
             dropout,
         ),
         decimator=pdp_decimate.NeuralDecimator(
             device,
             propagator_dimension,
             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,
     )