brew install cmake hg
hg clone https://bitbucket.org/eigen/eigen/ -r b2e267d
brew install --HEAD eigen
cd dynet
mkdir build
cd build
cmake .. -DEIGEN3_INCLUDE_DIR=/usr/local/cellar/eigen/3.3.4/include/eigen3 -DENABLE_CPP_EXAMPLES=ON
make -j4
then error
/usr/local/Cellar/eigen/3.3.4/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:39:7: error:
class template partial specialization is not more specialized than the
primary template [-Winvalid-partial-specialization]
set the following information in CMakeLists.txt line 84
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-partial-specialization")
make -j4
done
# Test with an example
./examples/xor
Reference:https://github.com/clab/dynet#installation
https://github.com/zou3519/pytorch/commit/6ba96952a6c7b9a6a495f333427c15c7ba18fa22