[mlpack-git] [mlpack] Enhance SoftmaxRegression (#457)
Ryan Curtin
notifications at github.com
Tue Sep 29 08:27:23 EDT 2015
> @@ -38,12 +37,25 @@ class SoftmaxRegressionFunction
> const arma::mat InitializeWeights();
>
> /**
> + * Initialize Softmax Regression weights(trainable parameters) with
> + * the given parameters.
> + * @param featureSize The features size of the training set
> + * @param numClasses Number of classes for classification.
> + * @param fitIntercept Intercept term flag.
> + * @return weights after initialize
> + */
> + static const arma::mat InitializeWeights(const size_t featureSize,
> + const size_t numClasses,
> + const bool fitIntercept = false);
My only suggestion here might be to take the return value as a parameter (i.e. `arma::mat& weights`). RVO might successfully optimize out the copy in some cases, but I'm not sure that every compiler will do RVO correctly in this case.
---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/457/files#r40664352
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150929/6ad46b8a/attachment.html>
More information about the mlpack-git
mailing list