-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.h
More file actions
50 lines (38 loc) · 985 Bytes
/
types.h
File metadata and controls
50 lines (38 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef NEURALNETWORK_TYPES_H
#define NEURALNETWORK_TYPES_H
#include <xtensor/containers/xarray.hpp>
#include <functional>
#include <string>
inline const std::string DIR_PATH = "/Users/alexandertian/CLionProjects/";
using ActivationFunction = std::function<xt::xarray<float>(const xt::xarray<float>&)>;
using ActivationDerivative = std::function<xt::xarray<float>(const xt::xarray<float>&)>;
using CostFunction = std::function<float(const xt::xarray<float>&, const xt::xarray<float>&)>;
using CostDerivative = std::function<xt::xarray<float>(const xt::xarray<float>&, const xt::xarray<float>&)>;
constexpr float EPSILON = 1e-9f;
enum class ActivationID {
RELU,
SIGMOID,
SOFTMAX,
GELU,
NONE
};
enum class CostID {
MSE,
CEL,
NONE
};
enum class LLM_Mode {
CHARS,
LOWER_CHARS,
WORDS
};
enum class Mode {
TRAINING,
EVALUATION,
INFERENCE
};
enum class TrainingMode {
Fresh,
Resume
};
#endif //NEURALNETWORK_TYPES_H