inline const auto join_slices(const BaseCube<typename T1::elem_type,T1>& A, const BaseCube<typename T1::elem_type,T2>& B, const BaseCube<typename T1::elem_type,T3>& C) { return join_slices(join_slices(A, B), C); }
mat Blob::reshape() { cube out; for (int i = 0; i < N_; ++i) { out = join_slices(out, data_[i]); } //return arma::reshape(vectorise(dst), N_, C_*H_*W_); //return arma::reshape(vectorise(dst), C_*H_*W_, N_).t(); out.reshape(C_*H_*W_, N_, 1); return out.slice(0).t(); }
inline Cube<typename T1::elem_type> join_slices(const BaseCube<typename T1::elem_type,T1>& A, const Base<typename T1::elem_type,T2>& B) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap<T2> U(B.get_ref()); const Cube<eT> M(const_cast<eT*>(U.M.memptr()), U.M.n_rows, U.M.n_cols, 1, false); return join_slices(A,M); }