neurobench.postprocessing

Post-Processors

class neurobench.postprocessing.postprocessor.NeuroBenchPostProcessor(args)[source]

Bases: object

Abstract class for NeuroBench postprocessors.

Postprocessors take the spiking output from the models and provide several methods of combining them. Individual postprocessors are responsible for implementing init and call functions.

neurobench.postprocessing.postprocessor.aggregate(spikes)[source]

Returns the aggregated spikes.

Parameters:

spikes – A torch tensor of spikes of shape (batch, timestep, classes)

Returns:

A torch tensor of spikes of shape (batch, classes)

Return type:

spikes

neurobench.postprocessing.postprocessor.choose_max_count(spikes)[source]

Returns the class with the highest spike count over the sample.

Parameters:

spikes – A torch tensor of spikes of shape (batch, timestep, classes)