提交 a88614e0 authored 作者: Jeff Donahue's avatar Jeff Donahue

fix test_nnet.py NameError caused by use of old `numpy` instead of `np`

上级 eb59a1f9
......@@ -1775,9 +1775,9 @@ class T_sigmoid_binary_crossentropy(unittest.TestCase):
utt.seed_rng()
def _get_test_inputs(self, n=50):
pred, target = numpy.random.randn(2, n).astype(config.floatX)
pred, target = np.random.randn(2, n).astype(config.floatX)
# apply sigmoid to target, but not pred
return [pred, 1 / (1 + numpy.exp(-target))]
return [pred, 1 / (1 + np.exp(-target))]
def test_matches_binary_crossentropy(self):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论