# Pytorch Notes If we have a tensor of shape `[2]` and want to convert it to `[1, 2]`, i.e. add an axis, we can simply do: ```python t = [84] >> t.shape >> [2] t = t[None] >> t.shape >> [1, 2] ``` #### Learning Loop [The Ultimate Training Loop](https://ankur-singh.github.io/blog/the-ultimate-training-loop) --- Date: 20230810 Links to: Tags: References: * []()