Construct an unfolded_dtensor from a dense matrix, mode, and dimensions of original tensor.
unfolded_dtensor(mat, mode, tensor_dims) # S4 method for Matrix,numeric,numeric unfolded_dtensor(mat, mode, tensor_dims)
mat | dense matrix representing unfolded tensor |
---|---|
mode | dimension to unfold tensor along |
tensor_dims | original dimensions of tensor (useful for re-folding) |
unfolded_dtensor-class
for class documentation.