def dropout(x, p=0): if p == 0: return x else: mask = cgt.greater(cgt.rand(*cgt.shape(x)), p) x = x * mask x = x / (1.0 - p) return x
def dropout(x, p=0): if p==0: return x else: mask = cgt.greater(cgt.rand(*cgt.shape(x)), p) x = x * mask x = x /(1.0-p) return x