I don’t believe that to_mkldnn() modifies the underlying model, just the memory format of the tensors, please let me know if I am wrong. We need more info on the AutoEncoder model and what that looks like. Could you also include the code to the model? Does that have any parameters?
As a reference here is the line that is erroring out: pytorch/distributed.py at master · pytorch/pytorch · GitHub