torch.nn.Parameter(nn/parameter.py)
在init.py中导入的是Parameter类,所以为nn.Parameter
代码:
from torch.autograd import Variable
class Parameter(Variable):
def __new__(cls, data=None, requires_grad=True):
return super(Parameter, cls).__new__(cls, data, requires_grad=requires_grad)
def __repr__(self):