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

Method init_fn

source/python.js:16393–16397  ·  view source on GitHub ↗
(script_module)

Source from the content-addressed store, hash-verified

16391 });
16392 this.registerFunction('torch.jit._script.wrap_cpp_module', (cpp_module) => {
16393 const init_fn = (script_module) => {
16394 for (const [name, module] of new torch.ModuleDict(script_module._c).items()) {
16395 script_module.__setattr__(name, torch.jit._script.wrap_cpp_module(module));
16396 }
16397 };
16398 return torch.jit._script.RecursiveScriptModule._construct(cpp_module, init_fn);
16399 });
16400 this.registerType('torch._C.DeserializationStorageContext', class extends Map {

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
__setattr__Method · 0.80

Tested by

no test coverage detected