class_docstr: ## Model
class_docstr_tok: ["#","#","Model"]
code: def __init__(self):
      super().__init__()
  
      # The first convolution layer takes a
      # 84x84 frame and produces a 20x20 frame
      self.conv1 = nn.Conv2d(
          in_channels=4, out_channels=32, kernel_size=8, stride=4
      )
  
      # The second convolution layer takes a
      # 20x20 frame and produces a 9x9 frame
      self.conv2 = nn.Conv2d(
          in_channels=32, out_channels=64, kernel_size=4, stride=2
      )
  
      # The third convolution layer takes a
      # 9x9 frame and produces a 7x7 frame
      self.conv3 = nn.Conv2d(
          in_channels=64, out_channels=64, kernel_size=3, stride=1
      )
  
      # A fully connected layer takes the flattened
      # frame from third convolution layer, and outputs
      # 512 features
      self.lin = nn.Linear(in_features=7 * 7 * 64, out_features=512)
  
      # A fully connected layer to get logits for $\pi$
      self.pi_logits = nn.Linear(in_features=512, out_features=4)
  
      # A fully connected layer to get value function
      self.value = nn.Linear(in_features=512, out_features=1)
  
      #
      self.activation = nn.ReLU()
  
imports: from typing import Dict
  import numpy
  import torch
  from torch import nn
  from torch import optim
  from torch.distributions import Categorical
  from labml import monit, tracker, logger, experiment
  from labml.configs import FloatDynamicHyperParam, IntDynamicHyperParam
  from labml_helpers.module import Module
  from labml_nn.rl.game import Worker
  from labml_nn.rl.ppo import ClippedPPOLoss, ClippedValueFunctionLoss
  from labml_nn.rl.ppo.gae import GAE
label_desc: Use image node_id 1 to create a new Model object from inherited base classes: Module with example: obj = Model()