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
相關文章
相關標籤/搜索