A simple solution is to remove the nn.Sequential() wrapper from self.fnn
self.fnn = nn.Linear(7*7*64, 10, bias=True) nn.init.xavier_uniform_(self.fnn.weight)