jwfromm commented on issue #4271: [Relay][Frontend][ONNX] operator support: DepthToSpace, SpaceToDepth URL: https://github.com/apache/incubator-tvm/pull/4271#issuecomment-552056942 Although your changes to the tests removing the hardcoding are definitely in the right direction, I think we should test the actual values instead of just their shapes. To do this, I recommend making a change from your current testing loop: ``` for target, ctx in ctx_list(): x = np.random.uniform(size=inshape).astype('int32') tvm_out = get_tvm_output(model, x, target, ctx, outshape, 'float32') tvm.testing.assert_allclose(outshape, tvm_out.shape) ``` to ``` for target, ctx in ctx_list(): x = np.random.uniform(size=inshape).astype('int32') tvm_out = get_tvm_output(model, x, target, ctx, outshape, 'float32') onnx_out = get_caffe2_output(model, x, 'int32') tvm.testing.assert_allclose(onnx_out, tvm_out) ``` That way we can be sure that both the values and shape produced are correct.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
