コード例 #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,
     )
コード例 #2
0
ファイル: ddpg_trainer.py プロジェクト: ystar2016/Horizon
 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,
     )
コード例 #3
0
ファイル: ddpg_trainer.py プロジェクト: sra4077/Horizon
 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,
     )
コード例 #4
0
 def predictor(self) -> DDPGPredictor:
     """Builds a DDPGPredictor."""
     return DDPGPredictor.export_actor(self)