<p>Thank you. I checked out pr/536 and linked the include directories and lib from there. I got rid off all the compiler error. However, I get a 100% classification error when I use std::make_tuple, but when I use std::tie I get 4.95916%. This is my funciton:</p>
<pre><code>auto BuildFFN(MatType& trainData, MatType& trainLabels, MatType& testData, MatType& testLabels, const size_t hiddenLayerSize)
{
// input layer
ann::LinearLayer<> inputLayer(trainData.n_rows, hiddenLayerSize);
ann::BiasLayer<> inputBiasLayer(hiddenLayerSize);
ann::BaseLayer<PerformanceFunction> inputBaseLayer;
// hidden layer
ann::LinearLayer<> hiddenLayer1(hiddenLayerSize, trainLabels.n_rows);
ann::BiasLayer<> hiddenBiasLayer1(trainLabels.n_rows);
ann::BaseLayer<PerformanceFunction> outputLayer;
// output layer
OutputLayerType classOutputLayer;
auto modules = std::tie(inputLayer, inputBiasLayer, inputBaseLayer, hiddenLayer1, hiddenBiasLayer1, outputLayer);
ann::FFN<decltype(modules), decltype(classOutputLayer), ann::RandomInitialization, PerformanceFunctionType> net(modules, classOutputLayer);
net.Train(trainData, trainLabels);
arma::mat prediction;
net.Predict(testData, prediction);
double classificationError;
for (size_t i = 0; i < testData.n_cols; i++)
{
if (arma::sum(arma::sum(arma::abs(prediction.col(i) - testLabels.col(i)))) != 0)
{
classificationError++;
}
}
std::cout << "Classification Error = " << (double(classificationError) / testData.n_cols) * 100 << "%" << std::endl;
return net;
}
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/531#issuecomment-191313956">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCvU-GMAWLG4nX-1QIUwOYkCjbRvks5ppbrSgaJpZM4HmbCC.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/issues/531#issuecomment-191313956"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>