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

Method createGetAttr

source/python.js:12329–12337  ·  view source on GitHub ↗
(obj, field)

Source from the content-addressed store, hash-verified

12327 return n;
12328 }
12329 createGetAttr(obj, field) {
12330 const n = this.create('prim::GetAttr', [obj]);
12331 n.s_('name', field);
12332 const classType = obj.type();
12333 const outputType = classType.getAttribute(field);
12334 n.output().setType(outputType);
12335 n.output().setDebugName(torch._C.normalizeAttrName(field));
12336 return n;
12337 }
12338 createLoad(name, type) {
12339 const n = this.create('prim::Load', [], 1);
12340 n.s_('name', name);

Callers 1

attrMethod · 0.80

Calls 7

s_Method · 0.80
setTypeMethod · 0.80
setDebugNameMethod · 0.80
createMethod · 0.45
typeMethod · 0.45
getAttributeMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected