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

Method __build_cnn

intermediate_source/mario_rl_tutorial.py:442–454  ·  view source on GitHub ↗
(self, c, output_dim)

Source from the content-addressed store, hash-verified

440 return self.target(input)
441
442 def __build_cnn(self, c, output_dim):
443 return nn.Sequential(
444 nn.Conv2d(in_channels=c, out_channels=32, kernel_size=8, stride=4),
445 nn.ReLU(),
446 nn.Conv2d(in_channels=32, out_channels=64, kernel_size=4, stride=2),
447 nn.ReLU(),
448 nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1),
449 nn.ReLU(),
450 nn.Flatten(),
451 nn.Linear(3136, 512),
452 nn.ReLU(),
453 nn.Linear(512, output_dim),
454 )
455
456
457######################################################################

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected