MCPcopy Create free account
hub / github.com/Newmu/dcgan_code / dropout

Function dropout

lib/ops.py:36–44  ·  view source on GitHub ↗

dropout using activation scaling to avoid test time weight rescaling

(X, p=0.)

Source from the content-addressed store, hash-verified

34 return dist
35
36def dropout(X, p=0.):
37 """
38 dropout using activation scaling to avoid test time weight rescaling
39 """
40 if p > 0:
41 retain_prob = 1 - p
42 X *= t_rng.binomial(X.shape, p=retain_prob, dtype=theano.config.floatX)
43 X /= retain_prob
44 return X
45
46def conv_cond_concat(x, y):
47 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected