code: def resnet_layer(
      inputs,
      num_filters=16,
      kernel_size=3,
      strides=1,
      activation="relu",
      batch_normalization=True,
      conv_first=True,
  ):
      """2D Convolution-Batch Normalization-Activation stack builder
      # Arguments
          inputs (tensor): input tensor from input image or previous layer
          num_filters (int): Conv2D number of filters
          kernel_size (int): Conv2D square kernel dimensions
          strides (int): Conv2D square stride dimensions
          activation (string): activation name
          batch_normalization (bool): whether to include batch normalization
          conv_first (bool): conv-bn-activation (True) or
              bn-activation-conv (False)
      # Returns
          x (tensor): tensor as input to the next layer
      """
      conv = Conv2D(
          num_filters,
          kernel_size=kernel_size,
          strides=strides,
          padding="same",
          kernel_initializer="he_normal",
          kernel_regularizer=l2(1e-4),
      )
  
      x = inputs
      if conv_first:
          x = conv(x)
          if batch_normalization:
              x = BatchNormalization()(x)
          if activation is not None:
              x = Activation(activation)(x)
      else:
          if batch_normalization:
              x = BatchNormalization()(x)
          if activation is not None:
              x = Activation(activation)(x)
          x = conv(x)
      return x
  
file_path: AIX360/aix360/algorithms/profwt/resnet_keras_model.py
imports: from __future__ import print_function
  import keras
  from keras.layers import Dense, Conv2D, BatchNormalization, Activation
  from keras.layers import AveragePooling2D, Input, Flatten
  from keras.optimizers import Adam
  from keras.callbacks import ModelCheckpoint, LearningRateScheduler
  from keras.callbacks import ReduceLROnPlateau
  from keras.preprocessing.image import ImageDataGenerator
  from keras.regularizers import l2
  from keras import backend
  from keras.models import Model
  from keras.datasets import cifar10
  import numpy
  import os
  import json
  from collections import namedtuple
label_desc: Use image node_id 2 for calling a global function with example usage: resnet_layer(inputs, num_filters, kernel_size, strides, activation, batch_normalization, conv_first) and returns: x