From 7f9c5567ccbd73f7ccd25497da6cfb15f254a4fd Mon Sep 17 00:00:00 2001 From: gunther82 Date: Fri, 19 Jan 2018 15:18:09 +0100 Subject: [PATCH 1/2] Updated caffe/cppbuild.sh to add Axpy layer to caffe --- caffe/cppbuild.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/caffe/cppbuild.sh b/caffe/cppbuild.sh index 2022e42f721..7d396df171a 100755 --- a/caffe/cppbuild.sh +++ b/caffe/cppbuild.sh @@ -65,6 +65,10 @@ download https://github.com/google/snappy/releases/download/$SNAPPY/snappy-$SNAP download https://github.com/LMDB/lmdb/archive/LMDB_$LMDB.tar.gz lmdb-LMDB_$LMDB.tar.gz download http://downloads.sourceforge.net/project/boost/boost/${BOOST//_/.}/boost_$BOOST.tar.gz boost_$BOOST.tar.gz download https://github.com/BVLC/caffe/archive/$CAFFE_VERSION.tar.gz caffe-$CAFFE_VERSION.tar.gz +download https://raw.githubusercontent.com/hujie-frank/SENet/master/include/caffe/layers/axpy_layer.hpp axpy_layer.hpp +download https://raw.githubusercontent.com/hujie-frank/SENet/master/src/caffe/layers/axpy_layer.cpp axpy_layer.cpp +download https://raw.githubusercontent.com/hujie-frank/SENet/master/src/caffe/layers/axpy_layer.cu axpy_layer.cu + mkdir -p "$PLATFORM$EXTENSION" cd "$PLATFORM$EXTENSION" @@ -153,6 +157,10 @@ export C_INCLUDE_PATH="$OPENBLAS_PATH/include/" export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH" export LIBRARY_PATH="$OPENBLAS_PATH/:$OPENBLAS_PATH/lib/" +# add Axpy layer to caffe +cp ../axpy_layer.hpp caffe-$CAFFE_VERSION/include/caffe/layers/ +cp ../axpy_layer.cpp ../axpy_layer.cu caffe-$CAFFE_VERSION/src/caffe/layers/ + cd caffe-$CAFFE_VERSION patch -Np1 < ../../../caffe-nogpu.patch cp Makefile.config.example Makefile.config From dc68a5607c146958ee452e1a104fba87265dda15 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Sat, 20 Jan 2018 23:31:04 +0900 Subject: [PATCH 2/2] Download archive for AxpyLayer --- CHANGELOG.md | 2 ++ caffe/cppbuild.sh | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70e4155fad1..638fa857d0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ + * Add `AxpyLayer` to presets for Caffe ([pull #508](https://github.com/bytedeco/javacpp-presets/pull/508)) + ### January 16, 2018 version 1.4 * Fix some integer types in HDF5 being mistakenly mapped to smaller integer types * Remove the need for empty artifacts of unsupported platforms ([issue #434](https://github.com/bytedeco/javacpp-presets/issues/434)) diff --git a/caffe/cppbuild.sh b/caffe/cppbuild.sh index 7d396df171a..66bd3f5abd8 100755 --- a/caffe/cppbuild.sh +++ b/caffe/cppbuild.sh @@ -65,10 +65,7 @@ download https://github.com/google/snappy/releases/download/$SNAPPY/snappy-$SNAP download https://github.com/LMDB/lmdb/archive/LMDB_$LMDB.tar.gz lmdb-LMDB_$LMDB.tar.gz download http://downloads.sourceforge.net/project/boost/boost/${BOOST//_/.}/boost_$BOOST.tar.gz boost_$BOOST.tar.gz download https://github.com/BVLC/caffe/archive/$CAFFE_VERSION.tar.gz caffe-$CAFFE_VERSION.tar.gz -download https://raw.githubusercontent.com/hujie-frank/SENet/master/include/caffe/layers/axpy_layer.hpp axpy_layer.hpp -download https://raw.githubusercontent.com/hujie-frank/SENet/master/src/caffe/layers/axpy_layer.cpp axpy_layer.cpp -download https://raw.githubusercontent.com/hujie-frank/SENet/master/src/caffe/layers/axpy_layer.cu axpy_layer.cu - +download https://github.com/hujie-frank/SENet/archive/master.tar.gz SENet-master.tar.gz mkdir -p "$PLATFORM$EXTENSION" cd "$PLATFORM$EXTENSION" @@ -103,6 +100,7 @@ tar --totals -xf ../snappy-$SNAPPY.tar.gz tar --totals -xf ../lmdb-LMDB_$LMDB.tar.gz tar --totals -xf ../boost_$BOOST.tar.gz tar --totals -xf ../caffe-$CAFFE_VERSION.tar.gz +tar --totals -xf ../SENet-master.tar.gz export CFLAGS="-fPIC" export CXXFLAGS="-fPIC" @@ -158,8 +156,8 @@ export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH" export LIBRARY_PATH="$OPENBLAS_PATH/:$OPENBLAS_PATH/lib/" # add Axpy layer to caffe -cp ../axpy_layer.hpp caffe-$CAFFE_VERSION/include/caffe/layers/ -cp ../axpy_layer.cpp ../axpy_layer.cu caffe-$CAFFE_VERSION/src/caffe/layers/ +cp SENet-master/include/caffe/layers/axpy_layer.hpp caffe-$CAFFE_VERSION/include/caffe/layers/ +cp SENet-master/src/caffe/layers/axpy_layer.* caffe-$CAFFE_VERSION/src/caffe/layers/ cd caffe-$CAFFE_VERSION patch -Np1 < ../../../caffe-nogpu.patch