Critic¶
python_motion_planning.local_planner.ddpg.Critic
¶
Bases: Module
Critic network to estimate the value function q(s,a).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state_dim
|
int
|
state dimension |
required |
action_dim
|
int
|
action dimension |
required |
hidden_depth
|
int
|
the number of hidden layers of the neural network |
required |
hidden_width
|
int
|
the number of neurons in hidden layers of the neural network |
required |
min_state
|
Tensor
|
minimum of each value in the state |
required |
max_state
|
Tensor
|
maximum of each value in the state |
required |
min_action
|
Tensor
|
minimum of each value in the action |
required |
max_action
|
Tensor
|
maximum of each value in the action |
required |
forward(s, a)
¶
Calculate the Q-value of (s,a)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s
|
Tensor
|
state |
required |
a
|
Tensor
|
action |
required |
Returns:
Name | Type | Description |
---|---|---|
q |
Tensor
|
Q-value of (s,a) |