They are really doing different things. nn.Unfold gets the sliding window from image tensors. Tensor.unfold just unfolds along a single dimension. (You can think of the former as doing the latter along dim 2 and dim 3 at the same time). For Tensor.unfold, step arg is probably what you want.