MCPcopy
hub / github.com/tkipf/gcn / glorot

Function glorot

gcn/inits.py:11–15  ·  view source on GitHub ↗

Glorot & Bengio (AISTATS 2010) init.

(shape, name=None)

Source from the content-addressed store, hash-verified

9
10
11def glorot(shape, name=None):
12 """Glorot & Bengio (AISTATS 2010) init."""
13 init_range = np.sqrt(6.0/(shape[0]+shape[1]))
14 initial = tf.random_uniform(shape, minval=-init_range, maxval=init_range, dtype=tf.float32)
15 return tf.Variable(initial, name=name)
16
17
18def zeros(shape, name=None):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected