Discovered when investigating #55. RTNeural::ModelT expects the layer output to be an Eigen::Map so it can replace the memory with a placement new for the final layer. Previously, the Eigen activation layer implementations were using regular Eigen matrices, so the placement new would not correctly remap the memory if an activation function is the final layer in a network.
Discovered when investigating #55.
RTNeural::ModelT
expects the layer output to be anEigen::Map
so it can replace the memory with a placement new for the final layer. Previously, the Eigen activation layer implementations were using regular Eigen matrices, so the placement new would not correctly remap the memory if an activation function is the final layer in a network.