libdl
0.0.1
Simple yet powerful deep learning
Loading...
Searching...
No Matches
adapters.hpp
Go to the documentation of this file.
1
6
#ifndef DL_LEARNING_ADAPTERS_HPP
7
#define DL_LEARNING_ADAPTERS_HPP
8
9
#include <concepts>
10
11
namespace
dl {
12
25
auto
lossAdapter
(
auto
lossObjective) {
26
constexpr
auto
func = [](
auto
loss,
auto
& model,
auto
& x,
auto
& y) {
return
loss(model(x), y); };
27
return
std::bind_front(func, lossObjective);
28
}
29
30
}
// namespace dl
31
32
#endif
dl::lossAdapter
auto lossAdapter(auto lossObjective)
A training adapter for applying a single loss objective.
Definition
adapters.hpp:25
dl
learning
adapters.hpp
Generated by
1.9.8