I did the initialization but still my code in pytorch is not the performance of keras code
My pytorch class is as bellow:
class combineNet(nn.Module):
def __init__(self, modelA, modelB):

    super(combineNet, self).__init__()

    self.modelA = modelA

    self.modelB = modelB

    

    # conv

    self.conv1 = nn.Conv3d(2048, 128, kernel_size=(3,3,3), stride=1,  padding=( 0,1,2))

    self.BN1 = nn.BatchNorm3d(128, eps=0.001, momentum=0.99)

    self.conv2 = nn.Conv3d(128, 256, kernel_size=(3,3,3), stride=1,  padding=(2,1,0))

    self.BN2 = nn.BatchNorm3d(256, eps=0.001, momentum=0.99)

    self.MP = nn.MaxPool3d(2)

    self.fc1 = nn.Linear(1024, 256, bias=False)#

    self.BN = nn.BatchNorm1d(256, eps=0.001, momentum=0.99)

    self.dr = nn.Dropout(0.5)

    self.classifier1 = nn.Linear(256, 128, bias=False)#

    self.classifier2 = nn.Linear(128, 1, bias=False)#

    for m in self.modules():

            if isinstance(m, nn.Conv3d):

                m.weight = nn.init.kaiming_normal(m.weight, mode='fan_out')

            elif isinstance(m, nn.BatchNorm3d) or isinstance(m, nn.BatchNorm1d):

                m.weight.data.fill_(1)

                m.bias.data.zero_()

def forward(self, x1, x2):

    x1 = self.modelA(x1)

    x2 = self.modelB(x2)

    x = torch.cat((x1, x2), 1)#, dim=1

    x = x.view(x.size(0),2048,4,4,2)

    x = F.relu(self.conv1(x))

    x = self.BN1(x)

    x = F.relu(self.conv2(x))

    x = self.BN2(x)

    x = self.MP(x)

    x = x.view(x.size(0), -1)

    x = self.BN(F.relu(self.fc1(x))) #self.pool 

    x = self.dr(x)

    x = F.relu(self.classifier1(x))

    x = self.classifier2(x)

    return x

Any help is appreciated.