log_histograms()
Python package: neptune-scale
Logs the specified histograms at a particular step.
Parameters
Examples
Log a single histogram series per step
from neptune_scale import Run
from neptune_scale.types import Histogram
run = Run(...)
for step in epoch:
# your training loop
my_histogram = Histogram(
bin_edges=[0, 1, 40, 89, 1000],
counts=[5, 82, 44, 1],
)
run.log_histograms(
histograms={
"layers/1/activations": my_histogram
},
step=1,
)
Log multiple histogram series per step
for step in epoch:
# your training loop
my_histogram_1 = Histogram(
bin_edges=[0, 1, 2, 3, 4],
densities=[0.25, 0.25, 0.25, 0.25],
)
my_histogram_2 = Histogram(...)
my_histogram_3 = Histogram(...)
run.log_histograms(
histograms={
"layers/1/activations": my_histogram_1,
"layers/2/activations": my_histogram_2,
"layers/3/activations": my_histogram_3,
},
step=step,
)