fixed backward function
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user