-
Notifications
You must be signed in to change notification settings - Fork 26
/
config.py
22 lines (22 loc) · 1.07 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import numpy as np
class AlgoConfig:
def __init__(self):
self.action_type = 'dpg' # action type, dpg: deterministic policy gradient
self.buffer_type = 'REPLAY_QUE' # replay buffer type
self.buffer_size = 100000 # replay buffer size
self.batch_size = 128 # batch size
self.gamma = 0.99 # discount factor
self.policy_loss_weight = 0.002 # policy loss weight
self.critic_lr = 1e-3 # learning rate of critic
self.actor_lr = 1e-4 # learning rate of actor
self.tau = 0.001 # soft update parameter
self.value_min = -np.inf # clip min critic value
self.value_max = np.inf # clip max critic value
self.actor_layers = [
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
]
self.critic_layers = [
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
]