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

Method deserialize_device

source/python.js:20609–20614  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

20607 throw new python.Error(`SymBool has invalid field type ${s.type} with value ${s.value}.`);
20608 }
20609 deserialize_device(d) {
20610 if (d.index === null) {
20611 return new torch.device(d.type);
20612 }
20613 return new torch.device(d.type, d.index);
20614 }
20615 _get_schema_from_target(target) {
20616 if (target instanceof torch._ops.OpOverload) {
20617 return target._schema;

Callers 2

deserialize_inputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected