code: def modify_squeezenets(model):
      # /!\ Beware squeezenets do not have any last_linear module
  
      # Modify attributs
      model.dropout = model.classifier[0]
      model.last_conv = model.classifier[1]
      model.relu = model.classifier[2]
      model.avgpool = model.classifier[3]
      del model.classifier
  
      def logits(self, features):
          x = self.dropout(features)
          x = self.last_conv(x)
          x = self.relu(x)
          x = self.avgpool(x)
          return x
  
      def forward(self, input):
          x = self.features(input)
          x = self.logits(x)
          return x
  
      # Modify methods
      model.logits = types.MethodType(logits, model)
      model.forward = types.MethodType(forward, model)
      return model
  
imports: from __future__ import print_function, division, absolute_import
  import torchvision.models
  import torch.utils.model_zoo
  import torch.nn.functional
  import types
  import re
label_desc: Use image node_id 17 for calling a global function with example usage: modify_squeezenets(model) and returns: model, x, x