Torch.repeat and torch.expand which to use?

Therefore, when expanding a dimension of size 1, should torch.expand() always be used instead of torch.repeat()?

1 Like