MCPcopy Create free account
hub / github.com/AgentMaker/Paddle-RLBooks / Critic

Class Critic

ddpg/model.py:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 return self.forward(state).numpy()[0]
24
25class Critic(nn.Layer):
26 def __init__(self, state_dim, action_dim):
27 super(Critic, self).__init__()
28
29 self.l1 = nn.Linear(state_dim, 400)
30 self.l2 = nn.Linear(400 + action_dim, 300)
31 self.l3 = nn.Linear(300, 1)
32
33 def forward(self, state, action):
34 q = F.relu(self.l1(state))
35 q = F.relu(self.l2(paddle.concat([q, action], 1)))
36
37 return self.l3(q)

Callers 1

train.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected