def test_min(node, axis, use_gpu, keep_dimensions): node = Variable(node) assert_cuda_active(use_gpu) def func(node): return sum(rm.amin(node, axis, keepdims=keep_dimensions)) renom_min = rm.amin(node, axis=axis, keepdims=keep_dimensions).as_ndarray() numpy_min = np.amin(node, axis=axis, keepdims=keep_dimensions) assert np.allclose(renom_min, numpy_min, atol=1e-5, rtol=1e-3) compare(func, node, node)
def func(node): return sum(rm.amin(node, axis, keepdims=keep_dimensions))
def func(node): return sum(rm.amin(node, axis))