fixed backward function

This commit is contained in:
Aakash Kaushik
2020-09-27 08:06:40 +05:30
parent 7b7781ed72
commit 4175859a2a
2 changed files with 3 additions and 3 deletions
@@ -43,7 +43,7 @@ void Softmin<InputDataType, OutputDataType>::Backward(
const arma::Mat<eT>& gy,
arma::Mat<eT>& g)
{
g = input % (arma::repmat(arma::sum(gy % input), input.n_rows, 1) - gy);
g = input % (gy - arma::repmat(arma::sum(gy % input), input.n_rows, 1));
}
template<typename InputDataType, typename OutputDataType>
@@ -19,8 +19,8 @@ static const std::string testName = "MeanShift";
#include <mlpack/methods/mean_shift/mean_shift_main.cpp>
#include "test_helper.hpp"
#include <boost/test/unit_test.hpp>
#include "../test_tools.hpp"
#include "../test_catch_tools.hpp"
#include "catch.hpp"
using namespace mlpack;