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