MCPcopy Index your code
hub / github.com/lutzroeder/netron / replaceAndRemoveIfOutput

Method replaceAndRemoveIfOutput

source/python.js:7360–7365  ·  view source on GitHub ↗
(n, i, replacement)

Source from the content-addressed store, hash-verified

7358 this._made_change = true;
7359 }
7360 replaceAndRemoveIfOutput(n, i, replacement) {
7361 n.outputs()[i].replaceAllUsesWith(replacement);
7362 n.eraseOutput(i);
7363 n.blocks().at(0).eraseOutput(i);
7364 n.blocks().at(1).eraseOutput(i);
7365 }
7366 removeExtraIfOutputs(n) {
7367 torch._C.TORCH_CHECK(n.kind() === 'prim::If');
7368 const [true_block, false_block] = n.blocks();

Callers 1

removeExtraIfOutputsMethod · 0.80

Calls 5

replaceAllUsesWithMethod · 0.80
eraseOutputMethod · 0.80
atMethod · 0.80
blocksMethod · 0.80
outputsMethod · 0.45

Tested by

no test coverage detected