multigeom.encoders#

Encoders, the models that predict neural responses from images: a backbone followed by a readout fitted to neural data.

* `NeuralEncoder` and its methods `predict`, `fit_readout`, `save`, `load`;
  `load_encoder` to get an encoder of the paper;
* readouts (`GaussianReadout`, `LinearReadout`, `FactorizedReadout`) and the small
  trainable `SmallCNNBackbone`;
* `register_backbone` and `register_readout` to add your own;
* the reference encoders of the paper (frozen Inception, ResNet-50 or ON-OFF backbone,
  Gaussian readout) and `build_encoder`.

Any other fitted PyTorch model can be used instead: see `multigeom.encoders.contract`
for the contract it must satisfy.

Modules

backbones

Feature extractors (backbones).

contract

The encoder contract: what the pipeline requires of an encoder f: image -> responses, and a check that enforces it.

fitting

Fitting the readout of an encoder to neural responses.

neural

NeuralEncoder: an image-to-neural-response model made of a backbone and a readout, with the methods to use it:

readout

Readouts: the part of an encoder that is fitted to neural data.

receptive_field

Where in the image a neuron of an encoder looks: the receptive-field regions of a Gaussian readout.

reference

Image-to-response encoders f_φ : x ↦ r̂ used throughout the paper.

registry

Registries of backbones and readouts, by name.