explicitly provide memory format when calling to *_like operators (Redo of 81bf7364)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/30006
Test Plan: Imported from OSS
Differential Revision: D18575984
Pulled By: VitalyFedyunin
fbshipit-source-id: b72ea0404f0363001c94f39567c0aeae71cb1f67