inferno

Infrastructure

Module

An extension of PyTorch's Module class.

ShapedTensor

Tensor attribute with constrained shape.

RecordTensor

Tensor attribute with recorded history.

VirtualTensor

Tensor attribute derived from other attributes.

Hook

Provides and manages forward hook and prehook functionality.

ContextualHook

Provides forward hook and prehook functionality for subclasses.

StateHook

Interactable hook which only acts on module state.

Tensor Creation

zeros

Returns a tensor based on input filled with zeros.

ones

Returns a tensor based on input filled with ones.

empty

Returns an uninitialized tensor based on input.

full

Returns a tensor based on input filled with specified value.

fullc

Returns a float or complex tensor based on input filled with specified value.

uniform

Returns a tensor based on input filled with random values sampled uniformly.

normal

Returns a tensor based on input filled with random values sampled normally.

scalar

Returns a scalar tensor based on input with specified value.

astensors

Converts inputs into tensors.

Math Operations

exp

Type agnostic exponential function.

sqrt

Type agnostic square root function.

normalize

Normalizes a tensor.

rescale

Rescales a tensor (min-max normalization).

exponential_smoothing

Performs simple exponential smoothing for a time step.

holt_linear_smoothing

Performs Holt linear smoothing for a time step.

isi

Transforms spike trains into interspike intervals.

victor_purpura_pair_dist

Victor–Purpura distance between a pair of spike trains.

Spike Trace

trace_nearest

Performs a trace for a time step, considering the latest match.

trace_cumulative

Performs a trace for a time step, considering all prior matches.

trace_nearest_scaled

Performs a trace for a time step, considering the latest match, scaled by the inputs.

trace_cumulative_scaled

Performs a trace for a time step, considering all prior matches, scaled by the inputs.

Types

types.OneToOne

Callable type taking one input of a type and returning one output of the same type.

types.ManyToOne

Callable type taking an arbitrary number of inputs of a type and returning one output of the same type.

types.OneToMany

Callable type taking one input of a type and returning an arbitrary number of outputs of the same type.

types.ManyToMany

Callable type taking an arbitrary number of inputs of a type and returning the same number of outputs of the same type.

types.OneToOneMethod

Callable type taking a module and one input of a type and returning one output of the same type.

types.ManyToOneMethod

Callable type taking a module and an arbitrary number of inputs of a type and returning one output of the same type.

types.OneToManyMethod

Callable type taking a module and one input of a type and returning an arbitrary number of outputs of the same type.

types.ManyToManyMethod

Callable type taking a module and an arbitrary number of inputs of a type and returning the same number of outputs of the same type.