提交 3d073a41 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Typo: unsure -> ensure

上级 2b1e54ed
...@@ -2896,11 +2896,11 @@ class T_Scan(unittest.TestCase): ...@@ -2896,11 +2896,11 @@ class T_Scan(unittest.TestCase):
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
# If numbers are small, the gradients with respect to x are small # If numbers are small, the gradients with respect to x are small
# and the numeric differentiation becomes unstable. # and the numeric differentiation becomes unstable.
# To fix this issue I unsure we are sampling numbers larger in # To fix this issue I ensure we are sampling numbers larger in
# absolute value than 1 # absolute value than 1.
v_x = numpy.array(rng.uniform(size=(5, 2, 2), low=1., high=3.), v_x = numpy.array(rng.uniform(size=(5, 2, 2), low=1., high=3.),
dtype=theano.config.floatX) dtype=theano.config.floatX)
# making some entries to be negative # Making some entries to be negative.
pos = rng.uniform(size=(5, 2, 2), low=0., high=1) < .5 pos = rng.uniform(size=(5, 2, 2), low=0., high=1) < .5
v_x[pos] = -1 * v_x[pos] v_x[pos] = -1 * v_x[pos]
v_w = numpy.array(rng.uniform(size=(2, 2), low=1., high=3.), v_w = numpy.array(rng.uniform(size=(2, 2), low=1., high=3.),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论