用法:
class mxnet.initializer.Uniform(scale=0.07)
scale:(
float
,
optional
) - 生成的隨機值範圍的界限。值是從範圍 [-scale
,scale
]。默認比例為 0.07。
參數:
基礎:
mxnet.initializer.Initializer
使用從給定範圍內均勻采樣的隨機值初始化權重。
示例:
>>> # Given 'module', an instance of 'mxnet.module.Module', initialize weights >>> # to random values uniformly sampled between -0.1 and 0.1. ... >>> init = mx.init.Uniform(0.1) >>> module.init_params(init) >>> for dictionary in module.get_params(): ... for key in dictionary: ... print(key) ... print(dictionary[key].asnumpy()) ... fullyconnected0_weight [[ 0.01360891 -0.02144304 0.08511933]]
相關用法
- Python mxnet.initializer.register用法及代碼示例
- Python mxnet.initializer.One用法及代碼示例
- Python mxnet.initializer.Constant.dumps用法及代碼示例
- Python mxnet.initializer.Mixed用法及代碼示例
- Python mxnet.initializer.Zero用法及代碼示例
- Python mxnet.initializer.Normal用法及代碼示例
- Python mxnet.initializer.Initializer.dumps用法及代碼示例
- Python mxnet.io.PrefetchingIter用法及代碼示例
- Python mxnet.image.resize_short用法及代碼示例
- Python mxnet.image.random_crop用法及代碼示例
- Python mxnet.image.imresize用法及代碼示例
- Python mxnet.image.center_crop用法及代碼示例
- Python mxnet.image.CreateAugmenter用法及代碼示例
- Python mxnet.image.ImageIter.read_image用法及代碼示例
- Python mxnet.image.CreateMultiRandCropAugmenter用法及代碼示例
- Python mxnet.io.NDArrayIter用法及代碼示例
- Python mxnet.io.ResizeIter用法及代碼示例
- Python mxnet.image.imread用法及代碼示例
- Python mxnet.image.CreateDetAugmenter用法及代碼示例
- Python mxnet.image.ImageDetIter.sync_label_shape用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.initializer.Uniform。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。