Fittet new functions to everying in neural networks. Still need to optimise for uint64_t vs int64_t and vec vs mat in some places.
This commit is contained in:
@@ -3,11 +3,20 @@
|
||||
#include <cstdint> //uint64_t
|
||||
//#include <stdexcept> // std::runtime_error
|
||||
|
||||
#include "../utils/vector.h"
|
||||
#include "../utils/matrix.h"
|
||||
#include "utils/vector.h"
|
||||
#include "utils/matrix.h"
|
||||
|
||||
namespace numerics::detail{
|
||||
|
||||
// ---------------- (Scalar, Scalar) -> Scalar ----------------
|
||||
template <typename T>
|
||||
T min_serial(const T a, const T b) {
|
||||
if (a >= b){
|
||||
return a;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
// ---------------- Matrix -> Scalar ----------------
|
||||
template <typename T>
|
||||
T min_serial(const utils::Matrix<T>& A) {
|
||||
|
||||
Reference in New Issue
Block a user