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

Method __init__

distributed/rpc/rl/main.py:56–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 See https://github.com/pytorch/examples/tree/main/reinforcement_learning
55 """
56 def __init__(self):
57 super(Policy, self).__init__()
58 self.affine1 = nn.Linear(4, 128)
59 self.dropout = nn.Dropout(p=0.6)
60 self.affine2 = nn.Linear(128, 2)
61
62 self.saved_log_probs = []
63 self.rewards = []
64
65 def forward(self, x):
66 x = self.affine1(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected