What this is about is that None in Python maps to an undefined torch::Tensor in C++. The the m.def is on the C++ side already,  so the default argument should be the default constructed torch::Tensor().