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

Method __init__

intermediate_source/reinforcement_q_learning.py:231–235  ·  view source on GitHub ↗
(self, n_observations, n_actions)

Source from the content-addressed store, hash-verified

229class DQN(nn.Module):
230
231 def __init__(self, n_observations, n_actions):
232 super(DQN, self).__init__()
233 self.layer1 = nn.Linear(n_observations, 128)
234 self.layer2 = nn.Linear(128, 128)
235 self.layer3 = nn.Linear(128, n_actions)
236
237 # Called with either one element to determine next action, or a batch
238 # during optimization. Returns tensor([[left0exp,right0exp]...]).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected