Is it correct to use??
def weights_init(m):
with torch.no_grad():
if isinstance(m, nn.Conv3d):
torch.nn.init.normal_(m.weight)
torch.nn.init.normal_(m.bias)
class ConvNetRedo1(nn.Module):
def init(self,numf1,numf2,fz1,fz2,nn2,nn3):
super(ConvNetRedo1, self).init()
self.numf1=numf1
self.numf2=numf2
self.fz1=fz1
self.fz2=fz2
self.nn2=nn2
self.nn3=nn3
self.layer1 = nn.Sequential(nn.Conv3d(1, self.numf1, kernel_size=self.fz1, stride=1, padding=2),nn.ReLU(),nn.MaxPool3d(kernel_size=2, stride=2))
net.apply(weights_init)
    self.layer2 = nn.Sequential(nn.Conv3d(self.numf1,self.numf2, kernel_size=self.fz2, stride=1, padding=2),nn.ReLU(),nn.MaxPool3d(kernel_size=2, stride=2))

net.apply(weights_init)
    self.fc1 = nn.Linear(3072, self.nn2) ##3027
    self.drop_out1 = nn.Dropout(0.5)
    self.relu1 = nn.ReLU() 
    self.fc2 = nn.Linear( self.nn2, self.nn3) 
    self.drop_out2 = nn.Dropout(0.5)
    self.relu2 = nn.ReLU()                          
    self.fc3 = nn.Linear( self.nn3, 1) 

def forward(self, x):
  x=x.unsqueeze(1).float()
  out = self.layer1(x)
 out = self.layer2(out)
  out = out.view(out.size(0), -1)
    out = self.fc1(out)
    out=self.drop_out1(out)
    out=self.relu1(out)
   out = self.fc2(out)
    out=self.drop_out2(out)
    out=self.relu2(out)  
    out = self.fc3(out)
    return out