mlpack
mlpack copied to clipboard
Remove unused `layerOutput` and `layerDelta`
layerOutput[network.size()-1] and layerDelta[0] inside MultiLayer are unused. This PR removes them.
Should I rename totalInputSize and totalOutputSize since they don't mean that with this PR?
Just did the few style fixes and renames there. Should I include in the comments why it's layers-1 now? Or leave it as it is.
We'll just let this one sit until the DAGNetwork is merged, then we can get rid of Concat and AddMerge entirely, which then makes the changes here way simpler. :+1:
totalDeltaSize == totalOutputSize, make sure to remove extra logic dealing with inSize, lastLayerSize, totalDeltaSize and rename totalOutputSize. Don't initialize residual memory unless number of layers > 1.
@rcurtin @andrewfurey21 DAGNetwork was merged in https://github.com/mlpack/mlpack/pull/3944, which this PR was apparently waiting on. Is this PR ok to go in now?
Definitely it should go in before the next release, but I'm not sure of the exact status. Looks like it needs master merged in and I think there may be a couple other small cleanups, not sure. @andrewfurey21 happy to provide a review whenever you think it's good to go. :+1:
Yeah haven't forgotten about this one. There are a couple things I wanted to change on this. I'm in the middle of few things right now, but will come back when those are done.