From CuDNN documentation -
"Tensors are restricted to having at least 4 dimensions... When working with lower dimensional data, it is
recommended that the user create a 4Dtensor, and set the size along unused dimensions to 1."
This method implements that - basically appends 1s to the end (shape or stride) to make it length 4,
or leaves it unmodified if the length is already 4 or more.
This method can be used for both shape and strides