deepof.hypermodels.VQVAE
- class deepof.hypermodels.VQVAE(input_shape: tuple, latent_dim: int, n_components: int = 10, learn_rate: float = 0.001, edge_feature_shape: tuple | None = None, use_gnn: bool = False, adjacency_matrix: ndarray | None = None)
Hyperparameter tuning pipeline for deepof.models.VQVAE.
- __init__(input_shape: tuple, latent_dim: int, n_components: int = 10, learn_rate: float = 0.001, edge_feature_shape: tuple | None = None, use_gnn: bool = False, adjacency_matrix: ndarray | None = None)
VQVAE hypermodel for hyperparameter tuning.
- Parameters:
input_shape (tuple) – shape of the input tensor.
latent_dim (int) – dimension of the latent space.
learn_rate (float) – learning rate for the optimizer.
n_components (int) – number of components in the quantization space.
edge_feature_shape (tuple) – shape of the edge feature tensor.
use_gnn (bool) – whether to use a graph neural network to encode the input data.
adjacency_matrix (np.ndarray) – adjacency matrix of the graph.
Methods
__init__
(input_shape, latent_dim[, ...])VQVAE hypermodel for hyperparameter tuning.
build
(hp)Override Hypermodel's build method.
declare_hyperparameters
(hp)fit
(hp, model, *args, **kwargs)Train the model.
get_hparams
(hp)Retrieve hyperparameters to tune, including the encoder type and the weight of the kmeans loss.
- __init__(input_shape: tuple, latent_dim: int, n_components: int = 10, learn_rate: float = 0.001, edge_feature_shape: tuple | None = None, use_gnn: bool = False, adjacency_matrix: ndarray | None = None)
VQVAE hypermodel for hyperparameter tuning.
- Parameters:
input_shape (tuple) – shape of the input tensor.
latent_dim (int) – dimension of the latent space.
learn_rate (float) – learning rate for the optimizer.
n_components (int) – number of components in the quantization space.
edge_feature_shape (tuple) – shape of the edge feature tensor.
use_gnn (bool) – whether to use a graph neural network to encode the input data.
adjacency_matrix (np.ndarray) – adjacency matrix of the graph.