test_execution.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:ngraph 作者: NervanaSystems 项目源码 文件源码
def test_reciprocal(input_tensor):
    """TODO."""
    p_u = input_tensor
    u = rng.uniform(.1, 5.0, p_u.axes)

    rec_u_np = np.reciprocal(u)
    rec_u = ng.reciprocal(p_u)

    with ExecutorFactory() as ex:
        rec_u_graph = ex.executor(rec_u, p_u)(u)
    ng.testing.assert_allclose(rec_u_np, rec_u_graph)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号