06:01
<
ShubhamAgrawal[m >
`error: 'class mlpack::ann::Layer<arma::Mat<double> >' has no member named 'Network'`
06:01
<
ShubhamAgrawal[m >
If I use AddMerge inside AddMerge then I won't be able to access Network()
06:02
<
ShubhamAgrawal[m >
Should I implement blank implementation of Network in `layer.hpp`
06:02
<
ShubhamAgrawal[m >
?
12:57
<
rcurtin[m] >
can you give more context about the issue?
13:08
<
ShubhamAgrawal[m >
See this testcase
13:09
<
ShubhamAgrawal[m >
`r.Network()[1]->Network()[0]->Parameters().fill(-1.0);` This line
13:25
<
rcurtin[m] >
Try casting the layer to a MultiLayer, then you will have the `Network()` function available
13:26
<
ShubhamAgrawal[m >
<ShubhamAgrawal[m> "`r.Network()[1]->Network()[0]->..." <- Can I do it in this line only?
13:26
<
ShubhamAgrawal[m >
Or do I need to use extra variable?
13:28
<
rcurtin[m] >
Yeah, it will be a long line but you can do it
13:28
<
ShubhamAgrawal[m >
rcurtin[m]: Can you tell meπ
13:29
<
rcurtin[m] >
You want the reference version; you don't want to make a copy
13:30
<
ShubhamAgrawal[m >
rcurtin[m]: Ok then there is bug in multi_layer file
13:30
<
ShubhamAgrawal[m >
I have fixed it
13:32
<
rcurtin[m] >
ποΈ thank you for finding that!
13:32
<
rcurtin[m] >
the cast will be something like this:
13:33
<
rcurtin[m] >
((MultiLayer<>*) r.Network()[1])->Network()[0]->Parameters().fill(-1.0);
13:33
<
rcurtin[m] >
or the two-line version:
13:33
<
rcurtin[m] >
MultiLayer<>* child = ((MultiLayer<>*) r.Network()[1]);
13:33
<
rcurtin[m] >
child->Network()[0]->Parameters().fill(-1.0);
13:34
<
ShubhamAgrawal[m >
Thanks
13:34
<
ShubhamAgrawal[m >
Got it
13:37
<
ShubhamAgrawal[m >
Can you tell me when does `SetWeights()` is called?
13:37
<
ShubhamAgrawal[m >
During initialization only?
13:42
<
rcurtin[m] >
whenever `FFN::parameters` changes size; let me find the call to ti
13:42
<
rcurtin[m] >
s/ti/it/
13:43
<
rcurtin[m] >
that's in `CheckNetwork()`, which is called whenever `Forward()`, `Backward()`, `Predict()`, or `Train()` (and maybe a few other functions) are called
13:44
<
rcurtin[m] >
`layerMemoryIsSet` will be false whenever `inputDimensions` may have changed from the last call to `CheckNetwork()` (and it is false when the `FFN` object is created)
13:44
<
rcurtin[m] >
I hope that helps, let me know if I answered the question well
13:52
<
ShubhamAgrawal[m >
What about loading the model?
14:03
<
rcurtin[m] >
yeah, serialization will set `layerMemoryIsSet` to false too
14:05
<
ShubhamAgrawal[m >
rcurtin[m]: I am confused
14:05
<
ShubhamAgrawal[m >
How do I save the weights in FFN?
14:05
<
rcurtin[m] >
I don't know what you mean? you can just use `serialize()`
14:05
<
rcurtin[m] >
(I am in a meeting, responses may be slow from here on out)
14:06
<
ShubhamAgrawal[m >
rcurtin[m]: ok