multigeom.diffusion.responses#

Stage 2: Generate synthetic neural responses for every TinyImageNet image by evaluating the trained encoder f_φ from Stage 1. These vectors form the conditioning input for the diffusion model trained in Stage 3.

The TinyImageNet image distribution is the diffusion-training distribution,
chosen because the THINGS dataset is too small to train a diffusion model
on directly. Conditioning on synthetic f_φ(x) responses approximates the
joint p(x, r) the multi-scale Fisher integrand integrates over.

Output: train_responses.pt and val_responses.pt under --out-dir, each a
torch.Tensor of shape [n_images, n_neurons].

Usage:
    python -m multigeom.diffusion.responses \
        --config inception --area V1 \
        --encoder-ckpt runs/encoders/inception/V1/best_model.pt \
        --out-dir runs/responses/inception/V1

Functions

main([argv])

Precompute and save the responses of an encoder on TinyImageNet (command-line entry point).

parse_args([argv])

Command-line arguments of python -m multigeom.diffusion.responses.

precompute_split(encoder, split, transform, ...)

Responses of encoder to every image of a TinyImageNet split.