code: def AlexNet_pytorch(im_height=224, im_width=224, num_classes=1000):
      # tensorflow中的tensor通道排序是NHWC
      input_image = layers.Input(
          shape=(im_height, im_width, 3), dtype="float32"
      )  # output(None, 224, 224, 3)
      x = layers.ZeroPadding2D(((2, 1), (2, 1)))(
          input_image
      )  # output(None, 227, 227, 3)
      x = layers.Conv2D(
          64, kernel_size=11, strides=4, activation="relu"
      )(
          x
      )  # output(None, 55, 55, 64)
      x = layers.MaxPool2D(pool_size=3, strides=2)(
          x
      )  # output(None, 27, 27, 64)
      x = layers.Conv2D(
          192, kernel_size=5, padding="same", activation="relu"
      )(
          x
      )  # output(None, 27, 27, 192)
      x = layers.MaxPool2D(pool_size=3, strides=2)(
          x
      )  # output(None, 13, 13, 128)
      x = layers.Conv2D(
          384, kernel_size=3, padding="same", activation="relu"
      )(
          x
      )  # output(None, 13, 13, 384)
      x = layers.Conv2D(
          256, kernel_size=3, padding="same", activation="relu"
      )(
          x
      )  # output(None, 13, 13, 256)
      x = layers.Conv2D(
          256, kernel_size=3, padding="same", activation="relu"
      )(
          x
      )  # output(None, 13, 13, 256)
      x = layers.MaxPool2D(pool_size=3, strides=2)(
          x
      )  # output(None, 6, 6, 256)
  
      x = layers.Flatten()(x)  # output(None, 6*6*256)
      x = layers.Dropout(0.5)(x)
      x = layers.Dense(4096, activation="relu")(x)  # output(None, 4096)
      x = layers.Dropout(0.5)(x)
      x = layers.Dense(4096, activation="relu")(x)  # output(None, 4096)
      x = layers.Dense(num_classes)(x)  # output(None, 5)
      predict = layers.Softmax()(x)
  
      model = models.Model(inputs=input_image, outputs=predict)
      return model
  
file_path: deep-learning-for-image-processing/tensorflow_classification/Test2_alexnet/fine_train_alexnet.py
imports: from tensorflow.keras.preprocessing.image import ImageDataGenerator
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import json
  import os
  import glob
  from tensorflow.keras import layers, models
label_desc: Use image node_id 1 for calling a global function with example usage: AlexNet_pytorch(im_height, im_width, num_classes) and returns: model