torch.nn.Linear()函数的理解

import torch x = torch.randn(128, 20) # 输入的维度是(128,20) m = torch.nn.Linear(20, 30) # 20,30是指维度 output = m(x) print('m.weight.shape:\n ', m.weight.shape) print('m.bias.shape:\n', m.bias.shape) print
相关文章
相关标签/搜索