diff --git a/.travis.yml b/.travis.yml index a0f86a2bfdf8..88c837798c01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ sudo: false # Enabling test on Linux and OS X os: - linux + - osx # Use Build Matrix to do lint and build seperately env: 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 */