Home / Class/ printDict Class — pytorch Architecture

printDict Class — pytorch Architecture

Architecture documentation for the printDict class in ivalue.cpp from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/core/ivalue.cpp lines 536–557

template <typename Dict>
std::ostream& printDict(
    std::ostream& out,
    const Dict& v,
    const IValueFormatter& formatter) {
  out << '{';

  bool first = true;
  for (const auto& pair : v) {
    if (!first) {
      out << ", ";
    }

    formatter(out, pair.key());
    out << ": ";
    formatter(out, pair.value());
    first = false;
  }

  out << '}';
  return out;
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free