diff --git a/python_binding/operator/pybind_LRN.cpp b/python_binding/operator/pybind_LRN.cpp
index f802152ba77f1506ac9d93284ecbe4a589b7de74..8807eb04081396b03db1076cf2e4b83a222b5f09 100644
--- a/python_binding/operator/pybind_LRN.cpp
+++ b/python_binding/operator/pybind_LRN.cpp
@@ -34,7 +34,7 @@ void init_LRN(py::module& m) {
 		.def_static("attributes_name", []() {
 			std::vector<std::string> result;
 			auto attributes = LRN_Op::attributesName();
-			for (size_t i = 0; attributes[i] != nullptr; ++i) {
+			for (size_t i = 0; i < size(EnumStrings<LRN_Op::Attr>::data); ++i) {
 				result.emplace_back(attributes[i]);
 			}
 				return result;