A Summary of Installing Dynet and Eigen in Ubuntu 16.04

1 minute read

Published:

I summerise the normal steps for installing Dynet with Eigen in Ubuntu 16.04.

Dynet

DyNet (formerly known as cnn) is a neural network library developed by Carnegie Mellon University and many others. It is written in C++ (with bindings in Python) and is designed to be efficient when run on either CPU or GPU.

Eigen

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

Because I need to rebuild this paper which is based on those libraries above, I have to install these C++ libraries and compile all of them in my laptop.

At first, I am not clear which versions of Dynet and Eigen are used in the model. So I tried to install the Dynet 1.0 and Eigen 3.2 according to the creating date of the Github.

However, I found that I chose a wrong version of Dynet and Eigen.

  1. the Makefile shows that the C++ library path is cnn/build/cnn not dynet/build/dynet. Therefore, I guessed the author used cnn not Dynet.
  2. When I compiled Dynet 1.0 with Eigen 3.2, there was a error during compiling. fatal error: unsupport/Eigen/CXX11/Tensor: No such file or directory. Then I found solutions from here. Others suggested:

    Just check your eigen’s version, make sure it is 3.3 or newer. I replaced the 3.2 version with 3.3.4, and fixed this problem. Maybe this can help you too.

  3. When the cnn library was compiled with Eigen 3.3, there was another error there is no easyloggingpp/src in cnn library. After checking the Github webpage, I need to manually dowenload corresponding easyloggingpp library.

To summerise, I succeeded rebuilding the model with cnn library, Eigen 3.3 and easyloggingpp V9.81.

Leave a Comment