function vec = simple_mlp_cell2vec(W)
% Wraps weight matrices into a vector (for general optimization
% code). Order of vec: b1 W1colMaj b2 W2colMaj ...

vec = [];
for L = 1:length(W)
  vec = [vec ; reshape(W{L},numel(W{L}),1)];
end
