code: def __init__(self, pretrained=True):
      super(ResNeXt, self).__init__()
  
      if pretrained:
          self.resnext = resnext101_64x4d()
      else:
          self.resnext = resnext101_64x4d(pretrained=None)
  
      self.layer0 = nn.Sequential(
          self.resnext.features[0],
          self.resnext.features[1],
          self.resnext.features[2],
          self.resnext.features[3],
      )
  
      self.layer1 = self.resnext.features[4]
      self.layer2 = self.resnext.features[5]
      self.layer3 = self.resnext.features[6]
      self.layer4 = self.resnext.features[7]
  
      self.layer5 = nn.Sequential(
          nn.AvgPool2d((7, 7), (1, 1)),
          Lambda(lambda x: x.view(x.size(0), -1)),  # View,
          nn.Sequential(
              Lambda(
                  lambda x: x.view(1, -1) if 1 == len(x.size()) else x
              ),
              nn.Linear(2048, 1000),
          ),
      )
  
imports: from ..None import resnext101_64x4d
  from math import floor
  import numpy
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new ResNeXt object from inherited base classes: nn with example: obj = ResNeXt(pretrained)