Skip to content

Commit

Permalink
* Add AxpyLayer to presets for Caffe (pull #508)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunther82 authored and saudet committed Jan 20, 2018
1 parent d43a96c commit 4a35b9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
6 changes: 6 additions & 0 deletions caffe/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +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://github.com/hujie-frank/SENet/archive/master.tar.gz SENet-master.tar.gz

mkdir -p "$PLATFORM$EXTENSION"
cd "$PLATFORM$EXTENSION"
Expand Down Expand Up @@ -99,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"
Expand Down Expand Up @@ -153,6 +155,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 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
cp Makefile.config.example Makefile.config
Expand Down

0 comments on commit 4a35b9c

Please sign in to comment.