(input_tensor, kernel_size, filters, stage, block, trainable=True)
return x
The identity block is the block that has no conv layer at shortcut.
    # Arguments
        input_tensor: input tensor
        kernel_size: default 3, the kernel size of middle conv layer at main path
        filters: list of integers, the filterss of 3 conv layer at main path
        stage: integer, current stage label, used for generating layer names
        block: 'a','b'..., current block label, used for generating layer names
    # Returns
        Output tensor for the block.
The identity block is the block that has no conv layer at shortcut.
    # Arguments
        input_tensor: input tensor
        kernel_size: default 3, the kernel size of middle conv layer at main path
        filters: list of integers, the filterss of 3 conv layer at main path
        stage: integer, current stage label, used for generating layer names
        block: 'a','b'..., current block label, used for generating layer names
    # Returns
        Output tensor for the block.
The identity block is the block that has no conv layer at shortcut . # Arguments input_tensor : input tensor kernel_size : default 3 the kernel size of middle conv layer at main path filters : list of integers the filterss of 3 conv layer at main path stage : integer current stage label used for generating layer names block : a b ... current block label used for generating layer names # Returns Output tensor for the block .
def identity_block_2D(input_tensor, kernel_size, filters, stage, block, trainable=True):
    """The identity block is the block that has no conv layer at shortcut.
    # Arguments
        input_tensor: input tensor
        kernel_size: default 3, the kernel size of middle conv layer at main path
        filters: list of integers, the filterss of 3 conv layer at main path
        stage: integer, current stage label, used for generating layer names
        block: 'a','b'..., current block label, used for generating layer names
    # Returns
        Output tensor for the block.
    """
    filters1, filters2, filters3 = filters
    bn_axis = 3

    conv_name_1 = 'conv' + str(stage) + '_' + str(block) + '_1x1_reduce'
    bn_name_1 = 'conv' + str(stage) + '_' + str(block) + '_1x1_reduce/bn'
    x = Conv2D(filters1, (1, 1),
               kernel_initializer='orthogonal',
               use_bias=False,
               trainable=trainable,
               kernel_regularizer=l2(weight_decay),
               name=conv_name_1)(input_tensor)
    x = BatchNormalization(axis=bn_axis, trainable=trainable, name=bn_name_1)(x)
    x = Activation('relu')(x)

    conv_name_2 = 'conv' + str(stage) + '_' + str(block) + '_3x3'
    bn_name_2 = 'conv' + str(stage) + '_' + str(block) + '_3x3/bn'
    x = Conv2D(filters2, kernel_size,
               padding='same',
               kernel_initializer='orthogonal',
               use_bias=False,
               trainable=trainable,
               kernel_regularizer=l2(weight_decay),
               name=conv_name_2)(x)
    x = BatchNormalization(axis=bn_axis, trainable=trainable, name=bn_name_2)(x)
    x = Activation('relu')(x)

    conv_name_3 = 'conv' + str(stage) + '_' + str(block) + '_1x1_increase'
    bn_name_3 = 'conv' + str(stage) + '_' + str(block) + '_1x1_increase/bn'
    x = Conv2D(filters3, (1, 1),
               kernel_initializer='orthogonal',
               use_bias=False,
               trainable=trainable,
               kernel_regularizer=l2(weight_decay),
               name=conv_name_3)(x)
    x = BatchNormalization(axis=bn_axis, trainable=trainable, name=bn_name_3)(x)

    x = layers.add([x, input_tensor])
    x = Activation('relu')(x)
    return x
def identity_block_2D ( input_tensor , kernel_size , filters , stage , block , trainable = True ) : filters1 , filters2 , filters3 = filters bn_axis = 3 conv_name_1 = 'conv' + str ( stage ) + '_' + str ( block ) + '_1x1_reduce' bn_name_1 = 'conv' + str ( stage ) + '_' + str ( block ) + '_1x1_reduce/bn' x = Conv2D ( filters1 , ( 1 , 1 ) , kernel_initializer = 'orthogonal' , use_bias = False , trainable = trainable , kernel_regularizer = l2 ( weight_decay ) , name = conv_name_1 ) ( input_tensor ) x = BatchNormalization ( axis = bn_axis , trainable = trainable , name = bn_name_1 ) ( x ) x = Activation ( 'relu' ) ( x ) conv_name_2 = 'conv' + str ( stage ) + '_' + str ( block ) + '_3x3' bn_name_2 = 'conv' + str ( stage ) + '_' + str ( block ) + '_3x3/bn' x = Conv2D ( filters2 , kernel_size , padding = 'same' , kernel_initializer = 'orthogonal' , use_bias = False , trainable = trainable , kernel_regularizer = l2 ( weight_decay ) , name = conv_name_2 ) ( x ) x = BatchNormalization ( axis = bn_axis , trainable = trainable , name = bn_name_2 ) ( x ) x = Activation ( 'relu' ) ( x ) conv_name_3 = 'conv' + str ( stage ) + '_' + str ( block ) + '_1x1_increase' bn_name_3 = 'conv' + str ( stage ) + '_' + str ( block ) + '_1x1_increase/bn' x = Conv2D ( filters3 , ( 1 , 1 ) , kernel_initializer = 'orthogonal' , use_bias = False , trainable = trainable , kernel_regularizer = l2 ( weight_decay ) , name = conv_name_3 ) ( x ) x = BatchNormalization ( axis = bn_axis , trainable = trainable , name = bn_name_3 ) ( x ) x = layers . add ( [ x , input_tensor ] ) x = Activation ( 'relu' ) ( x ) return x