Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 python 中初始化一个标准差为 0.08 的随机高斯数组。我能找到这样的东西
self.biases = [np.random.randn(y, 1) for y in sizes[1:]]
但是它的标准差为 1。
从
help(np.random.randn)
注意 ----- 对于来自 :math: 的随机样本N(\mu, \sigma^2),请使用: sigma * np.random.randn(...) + mu
N(\mu, \sigma^2)
sigma * np.random.randn(...) + mu