Home
last modified time | relevance | path

Searched refs:leaf_predicate (Results 1 – 2 of 2) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/python/
Dpytree.h89 absl::optional<pybind11::function> leaf_predicate = absl::nullopt);
94 absl::optional<pybind11::function> leaf_predicate = absl::nullopt);
Dpytree.cc111 absl::optional<py::function> leaf_predicate) { in FlattenInto() argument
115 if (leaf_predicate && (*leaf_predicate)(handle).cast<bool>()) { in FlattenInto()
119 auto recurse = [this, &leaf_predicate, &leaves](py::handle child) { in FlattenInto()
120 FlattenInto(child, leaves, leaf_predicate); in FlattenInto()
177 PyTreeDef::Flatten(py::handle x, absl::optional<py::function> leaf_predicate) { in Flatten() argument
180 tree->FlattenInto(x, leaves, leaf_predicate); in Flatten()