class_docstr: Transformer encoder followed by a Classification Head
class_docstr_tok: ["Transformer","encoder","followed","by","a","Classification","Head"]
code: def train_custom(self):
      for param in self.encoder.parameters():
          param.requires_grad = False
      self.classifier_head.train()
  
imports: import argparse
  import csv
  import json
  import math
  import time
  import numpy
  import torch
  import torch.optim
  import torch.utils.data
  from nltk.tokenize.treebank import TreebankWordDetokenizer
  from pplm_classification_head import ClassificationHead
  from torch import nn
  from torchtext import data
  from torchtext import datasets
  from tqdm import tqdm, trange
  from transformers import GPT2LMHeadModel, GPT2Tokenizer
label_desc: Use image node_id 3 for calling the Discriminator obj's underlying member method code with example usage: obj.train_custom() without return types