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

Add numba-scipy requirement and test a SciPy-based Elemwise in Numba

上级 1dc5b06e
......@@ -14,6 +14,7 @@ versioneer
jax; python_version > '3.6'
jaxlib; python_version > '3.6'
numba
numba-scipy>=0.3.0
diff-cover
pre-commit
isort
......
......@@ -93,11 +93,16 @@ def compare_numba_and_py(
@pytest.mark.parametrize(
"inputs, input_vals, output_fn",
[
(
[aet.vector()],
[np.random.randn(100).astype(config.floatX)],
lambda x: aet.nnet.sigmoid(x),
),
(
[aet.vector() for i in range(4)],
[np.random.randn(100).astype(config.floatX) for i in range(4)],
lambda x, y, x1, y1: (x + y) * (x1 + y1) * y,
)
),
],
)
def test_Elemwise(inputs, input_vals, output_fn):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论