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

Method mustNotBeNone

source/python.js:13166–13171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13164 return this.type() instanceof torch.NoneType || this._node.mustBeNone();
13165 }
13166 mustNotBeNone() {
13167 return this._node.kind() !== 'prim::AutogradAdd' &&
13168 this.type() !== torch.NoneType.get() &&
13169 !(this.type() instanceof torch.OptionalType) &&
13170 !(this.type() instanceof torch.UnionType && this.type().expect(torch.UnionType).canHoldType(torch.NoneType.get()));
13171 }
13172 isValidName(name) {
13173 if (name.length === 0) {
13174 return true;

Callers 1

optimizeBlockMethod · 0.80

Calls 4

kindMethod · 0.45
typeMethod · 0.45
getMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected