In the official documents, i find this method:
torch.nn.init.xavier_uniform(tensor, gain=1)
but when i use it, it raise an error:
xavier = nn.init.xavier_normal
AttributeError: ‘module’ object has no attribute ‘init’
and i import torch in ipython to test it, i didn’t find init either
why?