| 235 | // logging utility |
| 236 | template <class Container> |
| 237 | string ToString(const Container& v) { |
| 238 | std::stringstream ss; |
| 239 | ss << "{"; |
| 240 | size_t i = 0; |
| 241 | for (const auto& e : v) { |
| 242 | if (i != 0) { |
| 243 | ss << ", "; |
| 244 | } |
| 245 | ss << e.ToString(); |
| 246 | ++i; |
| 247 | } |
| 248 | ss << "}"; |
| 249 | return ss.str(); |
| 250 | } |
| 251 | |
| 252 | void VerifyFDefNodes(const tensorflow::FunctionDef& fdef, |
| 253 | const std::unordered_set<string>& nodes) { |