Why was Eigen chosen for TensorFlow? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
The TensorFlow white paper mentions that Eigen is used. Are there public explanations for how Eigen was chosen, and are they motivation for using Eigen in TensorFlow C++ op kernels?

I think that one of the key feature that drove the use of Eigen in the first place is because Eigen features its own highly optimized matrix product kernels whereas all other competitors have to be linked to some BLAS libraries. Moreover, the code of Eigen's product kernel is C++ with easy access to low-level internal kernels, so it was 'easy' for them to tweak and extend it to match their needs. This way Google has been able to develop the Tensor module with high CPU performance in a pure header-only fashion. The support for CUDA and now OpenCL via SyCL came later, those are not intrinsic features of Eigen that drove the initial choice.

Related

Algorithm for solving sparse linear system in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 months ago.
Improve this question
I need to solve the heat equation for 2D object using C++. I've found many sources explaining the mathematics behind it. I am using the Crank-Nicholson scheme, but given that I need a 1001 x 1001 discretization, the resulting linear system is huge and memory would blow in case of a "traditional" implementation.
Therefore, I am recurring to methods for solving sparse linear systems. I have been looking online and cannot find any source explaining an algorithm to solve this sparse system efficiently. I've found several packages that do solve it (like csparse, eigen, SciPy under-the-hood implementation), but found no theoretical explanation to really code it myself. For the moment I am trying to do "reverse engineering" on the source code of SuperLU.
What I am looking for is an algorithm that you may know to solve sparse linear systems.
Thanks in advance

Conditional Random Field (CRF) implementation / library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a free C++ conditional random field (CRF) implementation but not for text processing.
There are bunch of cool implementations:
CRFsuite (for text processing)
CRF++ (for text processing)
JGMT (Matlab - MEX not C++)
There are other packages like Darwin and HCRF with no usage examples in C++.
I'm wondering if anybody know any C++ CRF library other than what I mentioned above or know any example on how to setup and use Darwin or HCRF?
DGM is a very poserful but simple-to use CRF library, written on C++11. It was designed especially for image processing and includes many usage examples in tutorials.
It also includes the DenseCRF, mentioned in other answer.
DenseCRF is a great library that performs dense conditional random field (fully-connected CRF) very efficiently. The package comes with an easy to understand C++ demo and some examples. It is very fast and produces promising results on image data.
There is DGM C++ library implementing CRFs for image classification: http://research.project-10.de/dgm

Boost or TR1 equivalent of gsl_matrix and the like [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I cannot use gsl_matrix because my app is closed source and, according to this question, if I used GPL code directly, I'd have to make my app open source. And that's a no-no from the higher ups.
So... Does Boost, or even better, TR1, have a library with classes equivalent to gsl_matrix, gsl_vector and other types from the GNU Scientific Library? If there are such classes, how are they called?
Edit: I need to:
Perform dense matrix-vector products and sums (like gsl_blas_dgemv and gsl_blas_dgemm do)
Optionally, solve quadratic programming models.
First of all, there is C interface for BLAS/LAPACK. Some people find it 'hard' to deal with the call signatures which directly mirror the original BLAS ones.
If you're more into fancier side of things, there's Boost uBLAS interface, there's Armadillo, to name just two. Performance-wise, your mileage may vary.

Looking for a C++ open source matrix storage library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
The library needs to:
record vector or matrices in "frames" (timestamped)
enable multiple streams and markers
It would be good if the library:
had a BSD licence
was well documented
was written in C++
enabled non-linear access
I have found a library that is very interesting and does points (1) and (2): SDIF. But the documentation is lacking and the license is LGPL.
Any recommendations ?
What about boost ublas?
The boost license that ublas uses looks pretty liberal but IANAL.
I stumbled across Armadillo. It is LGPL. Well documented though.
As I have just suggested, Eigen is the way a matrix library in C++ should be.
Eigen is definitely the best matrix library in C++ at the moment.
http://eigen.tuxfamily.org/index.php?title=Main_Page
I warmly suggest you.
For example this code creates a random 10x10 matrix and compute its inverse:
MatrixXd A(10,10);
A.setRandom(10,10);
MatrixXd B = A.inverse();
you can have access to all numerical matrix algebra things, such as decompositions, linear system solving and other geometry algorithms.
It's only headers, no external dependency, no installation. It works for a large range of compilers and is very well mantained and documented.

What's a good convex optimization library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for a C++ library, and I am dealing with convex objective and constraint functions.
I am guessing your problem is non-linear. Where i work, we use SNOPT, Ipopt and another proprietary solver (not for sale). We have also tried and heard good things about Knitro.
As long as your problem is convex, all these solvers work well.
They all have their own API, but they all ask for the same information : values, first and second derivatives.
Assuming your problems are nonlinear, you can use free and open-sourced OPT++, available from Sandia Lab. I have used it in one project in C++ and it was easy to use and worked well.
From what I know, the CPLEX solver is the best convex optimization solver. Its the state of the art in LP solvers. Does convex optimization really well. While looking for it, I see that its IBM's software now. You can find it here : http://www-01.ibm.com/software/integration/optimization/cplex/