提交 d5b9940d authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Use random input instead of NumPy empty values in JAX test

`np.empty` was producing values at the edge of numerical zero. These values would apparently cause `jax` to truncate something during and intermediate step of a comparison operation like `array > 0`, which would produce a result different from standard NumPy's.
上级 9ea670ca
......@@ -354,7 +354,7 @@ def test_jax_Subtensors():
def test_jax_IncSubtensor():
x_np = np.empty((3, 4, 5), dtype=tt.config.floatX)
x_np = np.random.uniform(-1, 1, size=(3, 4, 5)).astype(tt.config.floatX)
x_tt = tt.arange(3 * 4 * 5).reshape((3, 4, 5)).astype(tt.config.floatX)
# "Set" basic indices
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论