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

Method len

source/python.js:16072–16081  ·  view source on GitHub ↗
(loc, m)

Source from the content-addressed store, hash-verified

16070 return this;
16071 }
16072 len(loc, m) {
16073 if (this._static_len) {
16074 return torch._C.insertConstant(m.graph(), this._static_len, loc);
16075 }
16076 if (this._has_only_end) {
16077 return this._end;
16078 }
16079 const g = m.graph();
16080 return g.insert('aten::__range_length', [this._start, this._end, this._step], [], loc);
16081 }
16082 getitem(loc, m, idx /*, type_hint */) {
16083 if (this._has_only_end) {
16084 return new torch._C.SimpleValue(idx);

Callers 1

emitLoopCommonMethod · 0.80

Calls 3

insertConstantMethod · 0.80
insertMethod · 0.80
graphMethod · 0.45

Tested by

no test coverage detected