1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00
This commit is contained in:
Zach Dwiel
2018-02-16 15:47:16 -05:00
parent 943e41ba58
commit 98f57a0d87
3 changed files with 44 additions and 27 deletions

View File

@@ -23,7 +23,7 @@ from utils import force_list
def normalized_columns_initializer(std=1.0):
def _initializer(shape, dtype=None, partition_info=None):
out = np.random.randn(*shape).astype(np.float32)
out *= std / np.sqrt(np.square(out).sum(axis=0, keep_dims=True))
out *= std / np.sqrt(np.square(out).sum(axis=0, keepdims=True))
return tf.constant(out)
return _initializer