From c7fa101e143ef68b1666dd264681cf977e3c4c1c Mon Sep 17 00:00:00 2001 From: adamhutchings Date: Thu, 19 Oct 2023 11:50:11 -0400 Subject: [PATCH] Does this work? --- core/include/jml/math/loss_functions.hpp | 4 ++-- core/src/math/loss_functions.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/include/jml/math/loss_functions.hpp b/core/include/jml/math/loss_functions.hpp index c5bca5e..e3f7652 100644 --- a/core/include/jml/math/loss_functions.hpp +++ b/core/include/jml/math/loss_functions.hpp @@ -20,8 +20,8 @@ namespace jml { -typedef JML_API std::function LF; -typedef JML_API std::function DL; +typedef std::function LF; +typedef std::function DL; class JML_API LossFunction { diff --git a/core/src/math/loss_functions.cpp b/core/src/math/loss_functions.cpp index 3d645f6..8cbfdda 100644 --- a/core/src/math/loss_functions.cpp +++ b/core/src/math/loss_functions.cpp @@ -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) @@ -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));