How can we do xavier initialisation with nn.sequential block used for making architecture of neural network ?
I was trying to do like this :
def __init__(self):
super().__init__()
torch.manual_seed(1)
self.net = nn.Sequential(
nn.Linear(2,15),
nn.Sigmoid(),
nn.Linear(15,1)
)
init.xavier_normal_(self.weights)