MCPcopy Index your code
hub / github.com/waleedka/hiddenlayer / detect_framework

Function detect_framework

hiddenlayer/graph.py:45–51  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

43###########################################################################
44
45def detect_framework(value):
46 classes = (value.__class__,) + value.__class__.__bases__
47 for c in classes:
48 if c.__module__.startswith("torch"):
49 return "torch"
50 elif c.__module__.startswith("tensorflow"):
51 return "tensorflow"
52
53
54###########################################################################

Callers 2

build_graphFunction · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected