MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __new__

Method __new__

tensorflow/python/platform/benchmark.py:138–143  ·  view source on GitHub ↗
(mcs, clsname, base, attrs)

Source from the content-addressed store, hash-verified

136 """The Benchmark class registrar. Used by abstract Benchmark class."""
137
138 def __new__(mcs, clsname, base, attrs):
139 newclass = super(mcs, _BenchmarkRegistrar).__new__(
140 mcs, clsname, base, attrs)
141 if not newclass.is_abstract():
142 GLOBAL_BENCHMARK_REGISTRY.add(newclass)
143 return newclass
144
145
146class Benchmark(six.with_metaclass(_BenchmarkRegistrar, object)):

Callers 1

ProfilerFromFileFunction · 0.45

Calls 2

is_abstractMethod · 0.45
addMethod · 0.45

Tested by 1

ProfilerFromFileFunction · 0.36