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

Method insertAfter

source/python.js:12831–12843  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

12829 return this;
12830 }
12831 insertAfter(n) {
12832 torch._C.AT_ASSERT(!this.inBlockList() || n.inBlockList());
12833 torch._C.AT_ASSERT(n.owningBlock());
12834 torch._C.TORCH_INTERNAL_ASSERT(n.kind() !== 'prim::Return', 'Attempting to insert a Node after the Return node or before the Param node.');
12835 this._owning_block = n.owningBlock();
12836 const next = n.next;
12837 n.next = this;
12838 this.prev = n;
12839 this.next = next;
12840 next.prev = this;
12841 // this.assignTopoPosition();
12842 return this;
12843 }
12844 allocNewInstance(g) {
12845 return new torch.Node(g, this.kind());
12846 }

Callers 5

insertBeforeMethod · 0.80
addBlockInputMethod · 0.80
addNodeOutputMethod · 0.80
getUnitValueMethod · 0.80

Calls 3

inBlockListMethod · 0.80
owningBlockMethod · 0.80
kindMethod · 0.45

Tested by

no test coverage detected