pytorch Official website torch.nn.Module Is described as follows .
torch.nn.Module Is the base class of all neural network modules , And all the neural network modules can contain other sub neural network modules , These sub neural network modules can be used as attribute assignment of class .
pytorch Official website torch.nn.Module.parameters Is described as follows : This parameter returns the iterator of all parameters of the current neural network module . if recuse Parameter is True, The iterator returned contains the submodules of the current module . On the contrary, it does not include .
As follows pytorch The official website code shows ,recuse The parameter defaults to True. From source yield The parameters further illustrate torch.nn.Module.parameters It returns an iterator .