profilers module¶
This package is not supposed to be used by the end user though. These are
just helpful modules used by k1lib.callbacks.profiler
Documenting everything here is kinda awkward, as just using it, you’ll get a better idea of what’s happening. If you want to dive deeper, then by all means, check out the source codes
computation module¶
-
class
k1lib.callbacks.profilers.computation.
ComputationProfiler
(profiler: Profiler)[source]¶ Bases:
k1lib.callbacks.callbacks.Callback
Profiles computation. Only provide reports on well known layers only, and thus can’t really be universal
-
property
tpAvailable
¶ Whether TimeProfiler’s results are available
-
property
io module¶
memory module¶
-
class
k1lib.callbacks.profilers.memory.
MemoryProfiler
[source]¶ Bases:
k1lib.callbacks.callbacks.Callback
Expected to be run only once only. If a new report for a new network architecture is required, then create a new one. Example:
l = k1lib.Learner.sample() l.cbs.withProfiler() # views graph and table l.Profiler.memory # views graph and table with selected modules highlighted l.Profiler.memory.css("Linear")
time module¶
-
class
k1lib.callbacks.profilers.time.
TimeProfiler
[source]¶ Bases:
k1lib.callbacks.callbacks.Callback
Profiles execution time. Only measures forward times, as backward times can’t really be measured