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

Method forward

policy_gradient/policy_gradient_basic.py:28–32  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

26 self.rewards = []
27
28 def forward(self, inputs):
29 x = F.relu(F.dropout(self.fc1(inputs), 0.6))
30 x = self.fc2(x)
31
32 return F.softmax(x, -1)
33
34 def select_action(self, inputs):
35 x = paddle.to_tensor(inputs).astype('float32').unsqueeze(0)

Callers 1

select_actionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected