Raise ValueError(f'No such layer: {name}. Existing layers are

I am trying to run the following code but I get this error how can I resolve it

    """ Encoder """
           
    s1 = encoder.layers[0].output
    s2 = encoder.get_layer("activation").output        
    s2 = ZeroPadding2D(( (1, 0), (1, 0) ))(s2)  

    s3 = encoder.get_layer("activation_3").output      
    s3 = ZeroPadding2D((1, 1))(s3)                    

    s4 = encoder.get_layer("activation_74").output      ## (61 x 61)
    s4 = ZeroPadding2D(( (2, 1),(2, 1) ))(s4)           ## (64 x 64)

    """ Bridge """
    b1 = encoder.get_layer("activation_161").output     ## (30 x 30)
    b1 = ZeroPadding2D((1, 1))(b1)                      ## (32 x 32)

    """ Decoder """
    d1 = decoder_block(b1, s4, 256)                     ## (64 x 64)
    d2 = decoder_block(d1, s3, 128)                     ## (128 x 128)
    d3 = decoder_block(d2, s2, 64)                     ## (256 x 256)
    d4 = decoder_block(d3, s1, 32)           
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-14-1189d1d2cbc0> in <module>()
     57 if __name__ == "__main__":
     58     input_shape = (256, 256, 3)
---> 59     model = inception_unet(input_shape)
     60     #model.summary()

<ipython-input-14-1189d1d2cbc0> in inception_unet(input_shape)
     29     """ Encoder """
     30              ## (512 x 512)
---> 31     s1 = encoder.get_layer[0].output
     32     s2 = encoder.get_layer("activation").output        ## (255 x 255)
     33     s2 = ZeroPadding2D(( (1, 0), (1, 0) ))(s2)         ## (256 x 256)

TypeError: 'method' object is not subscriptable
SEARCH STACK OVERFLOW

The error occurs when we use square brackets instead of parentheses to call a method.
Please change from s1 = encoder.layers[0].output to
s1 = encoder.get_layer("input_1").output. Thankyou!