torch.Tensor.to_mkldnn Tensor.to_mkldnn() → Tensor Returns a copy of the tensor in torch.mkldnn layout.