Num Rec app and save & loading
This commit is contained in:
parent
ee8027055e
commit
fa72355799
12 changed files with 8171 additions and 12 deletions
|
|
@ -18,6 +18,12 @@ namespace tp {
|
|||
|
||||
halnf val = 0;
|
||||
halnf grad = 0;
|
||||
|
||||
public:
|
||||
template <class tArchiver>
|
||||
void archive(tArchiver& ar) {
|
||||
ar % val;
|
||||
}
|
||||
};
|
||||
|
||||
Parameter bias;
|
||||
|
|
@ -27,9 +33,22 @@ namespace tp {
|
|||
halnf activationValueLinear = 0;
|
||||
|
||||
halnf cache;
|
||||
|
||||
public:
|
||||
template <class tArchiver>
|
||||
void archive(tArchiver& ar) {
|
||||
ar % bias;
|
||||
ar % weights;
|
||||
}
|
||||
};
|
||||
|
||||
Buffer<Neuron> neurons;
|
||||
|
||||
public:
|
||||
template <class tArchiver>
|
||||
void archive(tArchiver& ar) {
|
||||
ar % neurons;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
@ -45,6 +64,12 @@ namespace tp {
|
|||
void calcGrad(const Buffer<halnf>& output);
|
||||
void applyGrad(halnf step);
|
||||
|
||||
public:
|
||||
template <class tArchiver>
|
||||
void archive(tArchiver& ar) {
|
||||
ar % mLayers;
|
||||
}
|
||||
|
||||
public:
|
||||
Buffer<Layer> mLayers;
|
||||
halni mAvgCount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue