From a793a0d84079da67e029e6e4fc6c98d0407b0897 Mon Sep 17 00:00:00 2001 From: Sandeep Krishnamurthy Date: Thu, 17 Jan 2019 14:51:58 -0800 Subject: [PATCH] Cleanup includes --- src/operator/image/totensor_op-inl.h | 7 ------- tests/python/unittest/test_gluon_data_vision.py | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/operator/image/totensor_op-inl.h b/src/operator/image/totensor_op-inl.h index eb69edcfd24d..14d7e0bf0126 100644 --- a/src/operator/image/totensor_op-inl.h +++ b/src/operator/image/totensor_op-inl.h @@ -26,14 +26,7 @@ #define MXNET_OPERATOR_IMAGE_TOTENSOR_OP_INL_H_ -#include -#include #include -#include -#include -#include -#include "../mxnet_op.h" -#include "../operator_common.h" #include "../elemwise_op_common.h" namespace mxnet { diff --git a/tests/python/unittest/test_gluon_data_vision.py b/tests/python/unittest/test_gluon_data_vision.py index 235f531fbcc9..59403931aa50 100644 --- a/tests/python/unittest/test_gluon_data_vision.py +++ b/tests/python/unittest/test_gluon_data_vision.py @@ -32,13 +32,13 @@ def test_to_tensor(): data_in = np.random.uniform(0, 255, (300, 300, 3)).astype(dtype=np.uint8) out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8')) assert_almost_equal(out_nd.asnumpy(), np.transpose( - data_in.astype(dtype=np.float32) / 255.0, (2, 0, 1))) + data_in.astype(dtype=np.float32) / 255.0, (2, 0, 1))) # 4D Input data_in = np.random.uniform(0, 255, (5, 300, 300, 3)).astype(dtype=np.uint8) out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8')) assert_almost_equal(out_nd.asnumpy(), np.transpose( - data_in.astype(dtype=np.float32) / 255.0, (0, 3, 1, 2))) + data_in.astype(dtype=np.float32) / 255.0, (0, 3, 1, 2))) # Invalid Input invalid_data_in = nd.random.uniform(0, 255, (5, 5, 300, 300, 3)).astype(dtype=np.uint8)