class_docstr: Classifier based on BERT implementation.
docstr: Get torch wrappers for nn layers.
docstr_tok: ["Get","torch","wrappers","for","nn","layers","."]
code: def _map_layer(self, layer: str, dim=None):
      """
      Get torch wrappers for nn layers.
      """
      if layer == LINEAR:
          return torch.nn.Linear(dim[0], dim[1])
      elif layer == RELU:
          return torch.nn.ReLU(inplace=False)
      raise Exception(
          "Unrecognized network layer {}. Available options are: {}".format(
              layer, ", ".join(SUPPORTED_LAYERS)
          )
      )
  
imports: import os
  from collections import deque
  from typing import Optional
  import torch
  from parlai.agents.bert_ranker.bert_dictionary import BertDictionaryAgent
  from parlai.agents.bert_ranker.helpers import BertWrapper, MODEL_PATH
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import History
  from parlai.core.torch_classifier_agent import TorchClassifierAgent
  from parlai.utils.io import PathManager
  from parlai.utils.misc import warn_once
  from parlai.zoo.bert.build import download
label_desc: Use image node_id 7 for calling the BertClassifierAgent obj's underlying member method code with example usage: obj._map_layer(layer, dim) and returns: torch, torch