Skip to content

Commit

Permalink
Does this work?
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhutchings committed Oct 19, 2023
1 parent a32c0e3 commit c7fa101
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/include/jml/math/loss_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

namespace jml {

typedef JML_API std::function<double(const jml::Vector&, const jml::Vector&)> LF;
typedef JML_API std::function<double(const jml::Vector&, const jml::Vector&, int i)> DL;
typedef std::function<double(const jml::Vector&, const jml::Vector&)> LF;
typedef std::function<double(const jml::Vector&, const jml::Vector&, int i)> DL;

class JML_API LossFunction {

Expand Down
4 changes: 2 additions & 2 deletions core/src/math/loss_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ double LossFunction::get_loss_derivative(
return this->dl(actual, expected, index);
}

LF l2lf = [](const Vector& actual, const Vector& expected) {
JML_API LF l2lf = [](const Vector& actual, const Vector& expected) {
int a = actual.get_size(), e = expected.get_size();
if (a != e) {
LOGGER->log(Log(WARN)
Expand All @@ -40,7 +40,7 @@ LF l2lf = [](const Vector& actual, const Vector& expected) {
return sqrt(total);
};

DL l2dl = [](const Vector& actual, const Vector& expected, int i) {
JML_API DL l2dl = [](const Vector& actual, const Vector& expected, int i) {
double l = l2lf(actual, expected);
double ret = 1.0 / (2 * l);
ret *= 2 * (actual.get_entry(i) - expected.get_entry(i));
Expand Down

0 comments on commit c7fa101

Please sign in to comment.