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

Method _make_wrapper_subclass

source/python.js:21331–21335  ·  view source on GitHub ↗
(cls, size, stride, dtype, storage_offset, layout, device, requires_grad)

Source from the content-addressed store, hash-verified

21329 return 'tensor(...)';
21330 }
21331 static _make_wrapper_subclass(cls, size, stride, dtype, storage_offset, layout, device, requires_grad) {
21332 const t = new torch.Tensor(null, size, dtype, layout, device, requires_grad);
21333 t.__setstate__([null, storage_offset, size, stride]);
21334 return t;
21335 }
21336 });
21337 this.registerType('torch.nn.parameter.Parameter', class extends torch.Tensor {
21338 constructor(data, requires_grad) {

Callers 1

constructorMethod · 0.80

Calls 1

__setstate__Method · 0.45

Tested by

no test coverage detected