From 7a617f1dac4bd4b4f67f438798f3aeedb11865ad Mon Sep 17 00:00:00 2001 From: AN Long Date: Mon, 18 Aug 2025 23:32:15 +0900 Subject: [PATCH] Fix Python build for activation_soft_max function --- Python/src/module.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Python/src/module.cpp b/Python/src/module.cpp index 6354ec95..3c52e6a9 100644 --- a/Python/src/module.cpp +++ b/Python/src/module.cpp @@ -554,7 +554,9 @@ PYBIND11_MODULE(pydirectml, module) py::arg("new_size"), py::arg("new_strides")); - module.def("activation_soft_max", &dml::ActivationSoftmax, "Raise all elements to e, and divide all the elements in each batch by that batch's sum.", + module.def("activation_soft_max", [](dml::Expression input) { + return dml::ActivationSoftmax(input); + }, "Raise all elements to e, and divide all the elements in each batch by that batch's sum.", py::arg("input")); module.def("join", [](