MCPcopy
hub / github.com/lutzroeder/netron / print

Method print

source/python.js:12457–12476  ·  view source on GitHub ↗
(out, print_source_locations)

Source from the content-addressed store, hash-verified

12455 return this._op_version;
12456 }
12457 print(out, print_source_locations) {
12458 out.write('graph(');
12459 torch._C.const_value_list_with_types(out, this.inputs(), ',\n ');
12460 out.write('):\n');
12461 const groups = [];
12462 for (const node of this.nodes()) {
12463 node.print(out, 1, groups, print_source_locations);
12464 }
12465 out.write(' return (');
12466 torch._C.printValueRefs(out, this.outputs());
12467 out.write(')\n');
12468 for (let i = 0; i < groups.length; i++) {
12469 const fg = groups[i];
12470 out.write('with ');
12471 out.write(fg.kind());
12472 out.write(`_${i} = `);
12473 out.write(fg.g('Subgraph'));
12474 }
12475 return out;
12476 }
12477 toString() {
12478 const out = new io.StringIO();
12479 this.print(out, true);

Callers 1

toStringMethod · 0.80

Calls 15

hasAttributesMethod · 0.80
print_attributesMethod · 0.80
sourceRangeMethod · 0.80
file_line_colMethod · 0.80
blocksMethod · 0.80
atMethod · 0.80
writeMethod · 0.45
inputsMethod · 0.45
nodesMethod · 0.45
outputsMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected