Home

Awesome

Activaitons Histogram

The Twin Peaks Chart

*The Twin Peaks chart is a tool we can use to evaluate the health of our model in real time. The Twin Peaks chart is a tool we can use to evaluate the health of our model in real time. <br>It compares, for the last layer, the average of the activations histogram of the last quarter of batches with the activations histogram of the validation set for the same epoch.

twin peaks chart live twin peaks chart idea

The Colorful Dimension

The colorful dimension charts are made by plotting the activations histogram epoch by epoch, coloring the pixel according to log of intensity.

colorful dimension high lr colorful dimension high lr

Sample usage

data = ImageDataBunch.from_folder(untar_data(URLs.MNIST_SAMPLE),bs=1024)
# (1) Create custom ActivationsHistogram according to your needings
actsh = partial(ActivationsHistogram,modulesId=None,hMin=-10,hMax=10,nBins=200) 
# Add it to the callback_fns
learn = cnn_learner(data, models.resnet18, callback_fns=actsh, metrics=[accuracy])
# Fit: and see the Twin Peaks chart in action
learn.fit_one_cycle(4)
# (2) Customize and Plot the colorful chart!
learn.activations_histogram.plotActsHist(cols=20,figsize=(30,15),showEpochs=False)

A learning rate too high: colorful dimension high lr

On the repository