jatinchowdhury18 / RTNeural

Real-time neural network inferencing
BSD 3-Clause "New" or "Revised" License
551 stars 57 forks source link

Use Eigen::Map for activation layer outputs #56

Closed jatinchowdhury18 closed 2 years ago

jatinchowdhury18 commented 2 years ago

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.