peal.adaptors.clarc.SimpleProjection

class peal.adaptors.clarc.SimpleProjection[source]

Bases: Module

Layer that subtracts the mean artifact minus non-artifact activation.

Parameters:
  • activations (torch.Tensor) – Shape (N, ...); flattened per sample.

  • annotations (torch.Tensor) – Shape (N,) with 0 / 1 labels.

  • **kwargs – Ignored (accepts the CavProjection keyword arguments).

Methods

forward

Subtract the stored difference vector, ReLU, restore x.shape.

__init__(activations, annotations, **kwargs)[source]
Parameters:
forward(x)[source]

Subtract the stored difference vector, ReLU, restore x.shape.