Example #1
0
 def predictor(self, actor=True) -> DDPGPredictor:
     """Builds a DDPGPredictor.
     :param actor export the actor or the critic. If actor == True export
     the actor network, else export the critic network."""
     if actor:
         return DDPGPredictor.export_actor(
             self,
             self.state_normalization_parameters,
             self._additional_feature_types.int_features,
         )
     return DDPGPredictor.export_critic(
         self,
         self.state_normalization_parameters,
         self.action_normalization_parameters,
         self._additional_feature_types.int_features,
     )
Example #2
0
 def predictor(self, actor=True) -> DDPGPredictor:
     """Builds a DDPGPredictor.
     :param actor export the actor or the critic. If actor == True export
     the actor network, else export the critic network."""
     if actor:
         return DDPGPredictor.export_actor(
             self,
             self.state_normalization_parameters,
             sort_features_by_normalization(self.action_normalization_parameters)[0],
             self.min_action_range_tensor_serving,
             self.max_action_range_tensor_serving,
             self.use_gpu,
         )
     return DDPGPredictor.export_critic(
         self,
         self.state_normalization_parameters,
         self.action_normalization_parameters,
         self.use_gpu,
     )
Example #3
0
 def predictor(self, actor=True) -> DDPGPredictor:
     """Builds a DDPGPredictor.
     :param actor export the actor or the critic. If actor == True export
     the actor network, else export the critic network."""
     if actor:
         return DDPGPredictor.export_actor(
             self,
             self.state_normalization_parameters,
             sort_features_by_normalization(self.action_normalization_parameters)[0],
             self.min_action_range_tensor_serving,
             self.max_action_range_tensor_serving,
             self._additional_feature_types.int_features,
             self.use_gpu,
         )
     return DDPGPredictor.export_critic(
         self,
         self.state_normalization_parameters,
         self.action_normalization_parameters,
         self._additional_feature_types.int_features,
         self.use_gpu,
     )
Example #4
0
 def predictor(self) -> DDPGPredictor:
     """Builds a DDPGPredictor."""
     return DDPGPredictor.export_actor(self)