2021
02-28
02-28
Pytorch - TORCH.NN.INIT 参数初始化的操作
路径:https://pytorch.org/docs/master/nn.init.html#nn-init-doc初始化函数:torch.nn.init#-*-coding:utf-8-*-"""Createdon2019@author:fancp"""importtorchimporttorch.nnasnnw=torch.empty(3,5)#1.均匀分布-u(a,b)#torch.nn.init.uniform_(tensor,a=0.0,b=1.0)print(nn.init.uniform_(w))#=============================================================================#tensor([[0.9160,0.1832,0.52...
继续阅读 >