class_docstr: Densenet-BC model class for imagenet
  
  Args:
      growth_rate (int) - how many filters to add each layer (`k` in paper)
      block_config (list of 4 ints) - how many layers in each pooling block
      num_init_features (int) - the number of filters to learn in the first convolution layer
      bn_size (int) - multiplicative factor for number of bottle neck layers
        (i.e. bn_size * k features in the bottleneck layer)
      drop_rate (float) - dropout rate after each dense layer
      num_classes (int) - number of classification classes
      memory_efficient (bool) - If True, uses checkpointing. Much more memory efficient
class_docstr_tok: ["Densenet-BC","model","class","for","imagenet","Args",":","growth_rate","(","int",")","-","how","many","filters","to","add","each","layer","(","`","k","`","in","paper",")","block_config","(","list","of","4","ints",")","-","how","many","layers","in","each","pooling","block","num_init_features","(","int",")","-","the","number","of","filters","to","learn","in","the","first","convolution","layer","bn_size","(","int",")","-","multiplicative","factor","for","number","of","bottle","neck","layers","(","i.e",".","bn_size","*","k","features","in","the","bottleneck","layer",")","drop_rate","(","float",")","-","dropout","rate","after","each","dense","layer","num_classes","(","int",")","-","number","of","classification","classes","memory_efficient","(","bool",")","-","If","True",",","uses","checkpointing",".","Much","more","memory","efficient"]
code: def forward(self, x: Tensor) -> Tensor:
      features = self.features(x)
      out = F.relu(features, inplace=True)
      out = F.adaptive_avg_pool2d(out, (1, 1))
      out = torch.flatten(out, 1)
      out = self.classifier(out)
      return out
  
imports: import re
  from typing import Any, List, Tuple
  from collections import OrderedDict
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from torch import Tensor
label_desc: Use image node_id 2 for calling the DenseNet obj's underlying member method code with example usage: obj.forward(x) and returns: out