Promote each input to at least 3 dimensions.
Scalars become shape (1, 1, 1), 1-D tensors become (1, N, 1),
2-D tensors gain a trailing unit axis to become (M, N, 1);
tensors with rank pass through unchanged.
Parameters
*tensorsTensorOne or more input tensors of arbitrary rank.
Returns
Notes
Promotion rule per input t:
Note the asymmetric padding: 1-D tensors get both a leading and a
trailing unit axis (so they live in the middle, image-like axis),
while 2-D tensors gain only a trailing channel axis. This matches
NumPy and is convenient for image-processing code that expects
(H, W, C) arrays.
Examples
>>> import lucid
>>> v = lucid.tensor([1.0, 2.0])
>>> lucid.atleast_3d(v).shape
(1, 2, 1)