Efficient way to add a column of 1s in armadillo Cube

Viewed 1525

I am trying to implement neural network in c++ using armadillo linear algebra library . I am using Cube for storing inputs and weights of the network and I want to be able to add bias unit in the 3d matrix. I came across many ways to do that which involve conversation from cube to matrix which seemed inefficient. So what is the most efficient way to add a column of zeros in the beginning of each matrix in the cube?

1 Answers
Related