class_docstr: Q-function model for the grasping env.
  
  This model takes an 84x84 2D image and an integer that indicates the
  number of elapsed steps in an episode as input and outputs action values.
class_docstr_tok: ["Q-function","model","for","the","grasping","env",".","This","model","takes","an","84x84","2D","image","and","an","integer","that","indicates","the","number","of","elapsed","steps","in","an","episode","as","input","and","outputs","action","values","."]
code: def __init__(self, n_actions, max_episode_steps):
      super().__init__()
      self.embed = nn.Embedding(max_episode_steps + 1, 3136)
      self.image2hidden = nn.Sequential(
          nn.Conv2d(3, 32, 8, stride=4),
          nn.ReLU(),
          nn.Conv2d(32, 64, 4, stride=2),
          nn.ReLU(),
          nn.Conv2d(64, 64, 3, stride=1),
          nn.Flatten(),
      )
      self.hidden2out = nn.Sequential(
          nn.Linear(3136, 512),
          nn.ReLU(),
          nn.Linear(512, n_actions),
          DiscreteActionValueHead(),
      )
  
imports: import argparse
  import functools
  import os
  import gym
  import gym.spaces
  import numpy
  import torch
  from torch import nn
  import pfrl
  from pfrl import experiments, explorers, replay_buffers, utils
  from pfrl.q_functions import DiscreteActionValueHead
label_desc: Use image node_id 1 to create a new GraspingQFunction object from inherited base classes: nn with example: obj = GraspingQFunction(n_actions, max_episode_steps)