MCPcopy Create free account
hub / github.com/pytorch/examples / forward

Method forward

reinforcement_learning/reinforce.py:41–46  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

39 self.rewards = []
40
41 def forward(self, x):
42 x = self.affine1(x)
43 x = self.dropout(x)
44 x = F.relu(x)
45 action_scores = self.affine2(x)
46 return F.softmax(action_scores, dim=1)
47
48
49policy = Policy()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected