However I find that resize_() cannot save memory … It shares the same memory space with the original tensor.
Maybe the only way is to use clone(), then rely on garbage collector to release original tensor.