behavenet.models¶
Model documentation.
behavenet.models.base Module¶
Base models/modules in PyTorch.
Classes¶
|
Template for PyTorch modules. |
|
Template for PyTorch models. |
|
Applies a diagonal linear transformation to the incoming data: \(y = xD^T + b\) |
|
Wrapper class for multi-gpu training. |
behavenet.models.ae_model_architecture_generator Module¶
Functions¶
|
Calculate output dimension of a layer/dimension based on input size, kernel size, etc. |
|
Generate multiple random autoencoder architectures with a fixed number of latents. |
|
Estimate model size to determine if it will fit on a single GPU. |
|
Build symmetric decoding block of convolutional autoencoder based on encoding block. |
|
Build encoding block of convolutional autoencoder. |
|
Compute input/output dims as well as necessary padding for handcrafted architectures. |
|
Generate a random autoencoder architecture. |
Load default convolutional AE architecture used in Whiteway et al 2021. |
|
|
Load handcrafted autoencoder architecture from a json file. |
|
Load handcrafted autoencoder architectures from a json file. |
behavenet.models.aes Module¶
Autoencoder models implemented in PyTorch.
Functions¶
|
Load pretrained weights into already constructed AE model. |
Classes¶
|
Convolutional encoder. |
|
Convolutional decoder. |
|
Linear encoder. |
|
Linear decoder. |
|
Base autoencoder class. |
|
Conditional autoencoder class. |
|
Autoencoder class with matrix subspace projection for disentangling the latent space. |
behavenet.models.vaes Module¶
Variational autoencoder models implemented in PyTorch.
Functions¶
|
Sample from N(mu, var) |
Classes¶
|
Base variational autoencoder class. |
|
Conditional variational autoencoder class. |
|
Beta Total Correlation VAE class. |
|
Partitioned subspace variational autoencoder class. |
|
Partitioned subspace variational autoencoder class for multiple sessions. |
|
Convolutional encoder that separates label-related subspace. |
|
Convolutional encoder that separates label-related subspace. |
behavenet.models.decoders Module¶
Encoding/decoding models implemented in PyTorch.
Classes¶
|
General wrapper class for encoding/decoding models. |
|
Feedforward neural network model. |
|
LSTM neural network model. |
|
Decode images from predictors with a convolutional decoder. |