From 9f0f7cdc8a72185b5b0a0866821a33700ed2ed51 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Sat, 26 Sep 2015 18:13:02 -0700 Subject: [PATCH 1/2] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a0f86a2bfdf8..dd58af27ff3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false # Enabling test on Linux and OS X os: - - linux + - osx # Use Build Matrix to do lint and build seperately env: From f92c496d23c73a33cc537b876b9f42aa49d32056 Mon Sep 17 00:00:00 2001 From: tqchen Date: Sat, 26 Sep 2015 20:12:28 -0700 Subject: [PATCH 2/2] [OSX] Make OSX Travis work --- .travis.yml | 1 + scripts/travis_osx_install.sh | 5 ++--- scripts/travis_script.sh | 15 +++++++++++---- src/io/image_augmenter.h | 11 +---------- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd58af27ff3c..88c837798c01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ sudo: false # Enabling test on Linux and OS X os: + - linux - osx # Use Build Matrix to do lint and build seperately diff --git a/scripts/travis_osx_install.sh b/scripts/travis_osx_install.sh index f0a0be48a24b..04929633ee5a 100755 --- a/scripts/travis_osx_install.sh +++ b/scripts/travis_osx_install.sh @@ -21,12 +21,11 @@ conda update -q conda # Useful for debugging any issues with conda conda info -a -if [ ${TASK} == "python-package3" ]; then +if [ ${TASK} == "package3" ]; then conda create -n myenv python=3.4 - alias python3=python else conda create -n myenv python=2.7 fi source activate myenv conda install numpy scipy matplotlib nose -python -m pip install graphviz +python -m pip install graphviz \ No newline at end of file diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh index dd2a62c8b37b..a56b73c469b9 100755 --- a/scripts/travis_script.sh +++ b/scripts/travis_script.sh @@ -19,12 +19,15 @@ fi # prereqs for things that need make cp make/config.mk config.mk +export NOSE3=nosetests3 +export PYTHON3=python3 if [ ${TRAVIS_OS_NAME} == "osx" ]; then source scripts/travis_osx_install.sh echo "USE_BLAS=apple" >> config.mk echo "USE_OPENMP=0" >> config.mk - alias nosetests='python -m noise' - alias nosetests3='python -m noise' + alias nosetests='python -m nose' + export NOSE3='python -m nose' + export PYTHON3=python else echo "USE_BLAS=blas" >> config.mk echo "USE_CUDNN=0" >> config.mk @@ -46,6 +49,7 @@ fi if [ ${TASK} == "python" ]; then echo "USE_CUDA=0" >> config.mk make all || exit -1 + python --version export MXNET_ENGINE_TYPE=ThreadedEngine nosetests tests/python/unittest || exit -1 nosetests tests/python/train || exit -1 @@ -55,14 +59,16 @@ if [ ${TASK} == "python3" ]; then echo "USE_CUDA=0" >> config.mk make all || exit -1 export MXNET_ENGINE_TYPE=ThreadedEngine - nosetests3 tests/python/unittest || exit -1 - nosetests3 tests/python/train || exit -1 + ${PYTHON3} --version + ${NOSE3} tests/python/unittest || exit -1 + ${NOSE3} tests/python/train || exit -1 fi if [ ${TASK} == "python_naive" ]; then echo "USE_CUDA=0" >> config.mk make all || exit -1 export MXNET_ENGINE_TYPE=NaiveEngine + python --version nosetests tests/python/unittest || exit -1 nosetests tests/python/train || exit -1 fi @@ -71,6 +77,7 @@ if [ ${TASK} == "python_perdev" ]; then echo "USE_CUDA=0" >> config.mk make all || exit -1 export MXNET_ENGINE_TYPE=ThreadedEnginePerDevice + python --version nosetests tests/python/unittest || exit -1 nosetests tests/python/train || exit -1 fi diff --git a/src/io/image_augmenter.h b/src/io/image_augmenter.h index a9296afff3be..cd50c5e10b08 100644 --- a/src/io/image_augmenter.h +++ b/src/io/image_augmenter.h @@ -90,8 +90,7 @@ struct ImageAugmentParam : public dmlc::Parameter { class ImageAugmenter { public: // contructor - ImageAugmenter(void) - : tmpres_(false) { + ImageAugmenter(void) { #if MXNET_USE_OPENCV rotateM_ = cv::Mat(2, 3, CV_32F); #endif @@ -211,20 +210,12 @@ class ImageAugmenter { #endif private: - // temp input space - mshadow::TensorContainer tmpres_; - // mean image - mshadow::TensorContainer meanimg_; - /*! \brief temp space */ - mshadow::TensorContainer img_; #if MXNET_USE_OPENCV // temporal space cv::Mat temp_; // rotation param cv::Mat rotateM_; - // whether the mean file is ready #endif - bool meanfile_ready_; // parameters ImageAugmentParam param_; /*! \brief list of possible rotate angle */