<p>Hii <a href="https://github.com/rcurtin" class="user-mention">@rcurtin</a> , <a href="https://github.com/zoq" class="user-mention">@zoq</a> ,<br>
   I'm trying to compile the test cases as independent programs with<br>
<code>g++ -std=c++11 -l mlpack -l armadillo -l boost_serialization -l boost_program_options  Neural_network_using_mlpack.cpp</code></p>

<p>where Neural_network_using_mlpack.cpp is:</p>

<p>`#include </p>

<p>#include <br>
#include </p>

<p>#include </p>

<p>#include <br>
#include <br>
#include <br>
#include <br>
#include </p>

<p>#include <br>
#include <br>
#include </p>

<p>using namespace mlpack;<br>
using namespace mlpack::ann;<br>
using namespace mlpack::optimization;</p>

<p>template&lt;<br>
    typename PerformanceFunction,<br>
    typename OutputLayerType,<br>
    typename PerformanceFunctionType,<br>
    typename MatType = arma::mat</p>

<blockquote>
<p>void BuildNetwork(MatType&amp; trainData,<br>
                         MatType&amp; trainLabels,<br>
                         MatType&amp; testData,<br>
                         MatType&amp; testLabels,<br>
                         const size_t hiddenLayerSize,<br>
                         const size_t maxEpochs,<br>
                         const double classificationErrorThreshold)<br>
{<br>
  LinearLayer&lt;&gt; inputLayer(trainData.n_rows, hiddenLayerSize);<br>
  BiasLayer&lt;&gt; inputBiasLayer(hiddenLayerSize);<br>
  BaseLayer inputBaseLayer;</p>
</blockquote>

<p>LinearLayer&lt;&gt; hiddenLayer1(hiddenLayerSize, trainLabels.n_rows);<br>
  BiasLayer&lt;&gt; hiddenBiasLayer1(trainLabels.n_rows);<br>
  BaseLayer outputLayer;</p>

<p>OutputLayerType classOutputLayer;</p>

<p>auto modules = std::tie(inputLayer, inputBiasLayer, inputBaseLayer,<br>
                          hiddenLayer1, hiddenBiasLayer1, outputLayer);</p>

<p>FFN
      PerformanceFunctionType&gt; net(modules, classOutputLayer);</p>

<p>RMSprop opt(net, 0.01, 0.88, 1e-8,<br>
      maxEpochs * trainData.n_cols, 1e-18);</p>

<p>std::cout&lt;&lt;"Success"&lt;&lt;std::endl;</p>

<p>net.Train(trainData, trainLabels, opt);</p>

<p>MatType prediction;<br>
  net.Predict(testData, prediction);</p>

<p>size_t error = 0;<br>
  for (size_t i = 0; i &lt; testData.n_cols; i++)<br>
  {<br>
    if (arma::sum(arma::sum(<br>
        arma::abs(prediction.col(i) - testLabels.col(i)))) == 0)<br>
    {<br>
      error++;<br>
    }<br>
  }</p>

<p>double classificationError = 1 - double(error) / testData.n_cols;</p>

<p>}</p>

<p>int main()<br>
{<br>
  arma::mat dataset;<br>
  data::Load("thyroid_train.csv", dataset, true);</p>

<p>arma::mat trainData = dataset.submat(0, 0, dataset.n_rows - 4,<br>
      dataset.n_cols - 1);<br>
  arma::mat trainLabels = dataset.submat(dataset.n_rows - 3, 0,<br>
      dataset.n_rows - 1, dataset.n_cols - 1);</p>

<p>data::Load("thyroid_test.csv", dataset, true);</p>

<p>arma::mat testData = dataset.submat(0, 0, dataset.n_rows - 4,<br>
      dataset.n_cols - 1);<br>
  arma::mat testLabels = dataset.submat(dataset.n_rows - 3, 0,<br>
      dataset.n_rows - 1, dataset.n_cols - 1);</p>

<p>BuildNetwork
                      BinaryClassificationLayer,<br>
                      MeanSquaredErrorFunction&gt;<br>
      (trainData, trainLabels, testData, testLabels, 8, 200, 0.1);<br>
return 0;<br>
}`</p>

<p>I'm getting a somewhat similar error as is mentioned by tpBull in his first comment in this thread.<br>
I'hv installed mlpack on my system. Please can you guide me a little on this.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/562#issuecomment-204782112">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDctldVMmSOGy53ibc9P5RY77Sitks5pzrz8gaJpZM4Huzub.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/562#issuecomment-204782112"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>