<p>Hi there,</p>

<p>Just to be completely sure that the matrices are the same size, can you add the following line to <code>logisticTest()</code> and see what the output is?</p>

<pre><code>std::cout &lt;&lt; "x: " &lt;&lt; x_train.n_rows &lt;&lt; "x" &lt;&lt; x_train.n_cols &lt;&lt; "; y: " &lt;&lt; y_train.n_rows &lt;&lt; "x" &lt;&lt; y_train.n_cols &lt;&lt; ".\n";
</code></pre>

<p>If you've compiled mlpack from source, you can set the CMake option <code>-DDEBUG=ON</code> to get debugging symbols; that will probably shed a bit more light on what's going on here.  To me it looks like you are using the API correctly, but without the context of the rest of the code / an easy way to reproduce the error, I'm not 100% sure when I say that (I may also have overlooked something simple).</p>

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