Skip to content

Instantly share code, notes, and snippets.

View david-macleod's full-sized avatar

David MacLeod david-macleod

View GitHub Profile
@david-macleod
david-macleod / plot_timings.py
Created January 10, 2020 07:41
plot_timings
def plot_timings(loader, n_batches, model_time=0.2, max_time=2.5):
fig, ax = plt.subplots()
ax.set_axisbelow(True)
ax.yaxis.grid(which="major", color='black', linewidth=1)
zero_time = time.time()
worker_ids = {}
worker_count = count()