MCPcopy Create free account
hub / github.com/pytorch/pytorch / GetNetName

Function GetNetName

caffe2/python/workspace.py:342–349  ·  view source on GitHub ↗
(net)

Source from the content-addressed store, hash-verified

340
341
342def GetNetName(net):
343 if isinstance(net, basestring):
344 return net
345 if type(net).__name__ == "Net" or type(net).__name__ == "NetWithShapeInference":
346 return net.Name()
347 if isinstance(net, caffe2_pb2.NetDef):
348 return net.name
349 raise Exception("Not a Net object: {}".format(str(net)))
350
351
352def FeedBlob(name, arr, device_option=None):

Callers 5

CreateNetFunction · 0.85
RunNetOnceFunction · 0.85
RunNetFunction · 0.85
_Workspace_runFunction · 0.85

Calls 4

isinstanceFunction · 0.85
ExceptionClass · 0.85
NameMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…