def __init__(self, dropout_prob, fix_mask=False, fast_predict=False, prefix="dropout"):
self.dropout_prob = dropout_prob
self.fix_mask = fix_mask
self.prefix = prefix
self.fast_predict = fast_predict
print (self.prefix, self.dropout_prob, self.fix_mask)
assert (dropout_prob > 0)
""" This one works for the scan function.
(instead of theano.tensor.shared.randomstreams.RandomStreams)
See discussion: https://groups.google.com/forum/#!topic/theano-users/DbvTgTqkT8o
"""
self.rng = MRG_RandomStreams(seed=RANDOM_SEED, use_cuda=True)
评论列表
文章目录