In such a case a static cast to the right variant of the overloaded function works, you can try something like
torch::nn::Functional(static_cast<torch::Tensor(*)(const torch::Tensor &, int64_t)>(torch::log_softmax), 0)