Defining one class in another one

How to implement this part of tensorflow code in pytorch i have tried
but I am getting the “Not Implemented error”

this (ConvBNR) is subclass implemented in main class(ConvolutionNet)

class ConvBNR(keras.Model):  
           def __init__(self, ch, kernel_size=3, strides=1, padding='same'):
                 super(ConvBNR, self).__init__()
        
                   self.model = keras.models.Sequential([
                   layers.Conv2D(ch, kernel_size =  kernel_size, strides=strides, padding=padding,
                          kernel_regularizer=tf.keras.regularizers.l2(0.01)),
                  layers.BatchNormalization(),
                  ])
        
         def call(self, x, training=None): 
         x = self.model(x, training=training) 
         return x ""






class ConvolutionNet(Model): # Vitamon network except inception layer
    # Set layers.
    def __init__(self, num_classes):
        super (ConvolutionNetself).__init__()
        # Convolution Layer with 32 filters and a kernel size of 5.
        self.conv1 = ConvBNR(64)
        
        # self.concat1 = layers.Concatenate()

        # Convolution Layer with 64 filters and a kernel size of 3.
        self.conv2 = ConvBNR(64)
        # Max Pooling (down-sampling) with kernel size of 2 and strides of 2. 
        self.maxpool1 = layers.MaxPool2D(2, strides=2)
        
        self.conv3 = ConvBNR(64, kernel_size=3)
        # Max Pooling (down-sampling) with kernel size 
        #some others layers  ....
   def call(self, x, training=False): 
        x = self.conv1(x, training=training)
        # print(x.shape)
        x = self.conv2(x, training=training)
        x = self.maxpool1(x)
        x = self.conv3(x, training=training)

Is this a double post from here or what would the difference be?