In the implementation of Adam theres a line like
state['exp_avg'] = torch.zeros_like(p, memory_format=torch.preserve_format)
Where as the documentation has the following options
torch.zeros_like(input, dtype=None, layout=None, device=None, requires_grad=False)
What is this memory_format
argument ? And what does torch.preserve_format
do ?