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

Method __init__

policy_gradient/policy_gradient_basic.py:20–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18
19class Policy(nn.Layer):
20 def __init__(self):
21 super(Policy, self).__init__()
22 self.fc1 = nn.Linear(4, 128)
23 self.fc2 = nn.Linear(128, 2)
24
25 self.saved_log_probs = []
26 self.rewards = []
27
28 def forward(self, inputs):
29 x = F.relu(F.dropout(self.fc1(inputs), 0.6))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected