.unsqueeze(0) adds an additional dimension to the passed axis. In this case a dimension in position 0 will be added, which is usually the batch dimension.
[:3, :, :] slices the tensor in dim0 from index 0 to 2 inclusive. This might be necessary, if your in_transform returns a tensor with more than 3 channels (e.g. with an additional alpha channel).
.shape[-2:] returns the last two values of the shape. I guess content might be an image. If that’s the case, you’ll get the height and width using this operation.
Note that the default image tensor format is [channels, height, width].
I’m not familiar with the Udacity lessons, so I just assumed you are dealing with some kind of image classification task.
Let me know, if you need more information.