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

Method insertInput

source/python.js:12783–12793  ·  view source on GitHub ↗
(i, value)

Source from the content-addressed store, hash-verified

12781 return this._blocks;
12782 }
12783 insertInput(i, value) {
12784 torch._C.AT_ASSERT(this._graph === value.owningGraph());
12785 this._op = null;
12786 for (let use_itr = i; use_itr < this._inputs.length; use_itr++) {
12787 const use = this.findUseForInput(use_itr);
12788 use.offset += 1;
12789 }
12790 this._inputs.splice(i, 0, value);
12791 value._uses.push(new torch.Use(this, i));
12792 return value;
12793 }
12794 addInput(value) {
12795 torch._C.AT_ASSERT(this._graph === value.owningGraph());
12796 this._op = null;

Callers 1

constructorMethod · 0.80

Calls 3

owningGraphMethod · 0.80
findUseForInputMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected