neurobench.postprocessing

Post-Processors

class neurobench.processors.postprocessors.Aggregate[source]

Bases: NeuroBenchPostProcessor

Returns aggregated spikes.

__call__(spikes)[source]

Returns the aggregated spikes.

Parameters:

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

Returns:

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

Return type:

Tensor

class neurobench.processors.postprocessors.ChooseMaxCount[source]

Bases: NeuroBenchPostProcessor

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

__call__(spikes)[source]

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

Parameters:

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

Returns:

A torch tensor of shape (batch,) with the class index of the highest spike count

Return type:

Tensor