class_docstr: Densenet-BC model class, based on
  `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_
  
  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,
        but slower. Default: *False*. See `"paper" <https://arxiv.org/pdf/1707.06990.pdf>`_
class_docstr_tok: ["Densenet-BC","model","class",",","based","on","`","``","Densely","Connected","Convolutional","Networks","''","<","https",":","\/\/arxiv.org\/pdf\/1608.06993.pdf",">","`","_","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",",","but","slower",".","Default",":","*","False","*",".","See","`","``","paper","''","<","https",":","\/\/arxiv.org\/pdf\/1707.06990.pdf",">","`","_"]
code: def forward(
      self, x, with_latent=False, fake_relu=False, no_relu=False
  ):
      assert (
          not no_relu
      ), "DenseNet has no pre-ReLU activations, no_relu not supported"
      features = self.features(x)
      if fake_relu:
          out = FakeReLU.apply(features)
      else:
          out = F.relu(features, inplace=True)
      out = F.adaptive_avg_pool2d(out, (1, 1))
      out = torch.flatten(out, 1)
      pre_out = out.clone()
      out = self.classifier(out)
      if with_latent:
          return out, pre_out
      else:
          return out
  
imports: import re
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from collections import OrderedDict
  from torch.hub import load_state_dict_from_url
  from torch import Tensor
  from torch.jit.annotations import List
  from ..tools.custom_modules import FakeReLU
label_desc: Use image node_id 2 for calling the DenseNet obj's underlying member method code with example usage: obj.forward(x, with_latent, fake_relu, no_relu) and returns: out,  pre_out, out