Module providing Consciousness Exploration Tools for PyTorch.
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.
-
class
consciousnet.models.TDVAE(x_dim, b_dim, z_dim, t, d, n_layers=2, n_lstm_layers=1, preproc_dim=None, add_sigmoid=True)[source]¶ Hierachical Temporal Difference Variational Auto-Encoder with jumpy predictions.
Temporal Difference Variational Auto-Encoder, Karol Gregor, George Papamakarios, Frederic Besse, Lars Buesing and Theophane Weber, ICLR 2019, https://openreview.net/forum?id=S1x4ghC9tQ.
First, let’s first go through some definitions which would help understanding what is going on in the following code:
Observation: the observated variable x.
Belief: as the model is feed with a sequence of observations, x_t, the model updates its belief state b_t, through a LSTM network. It is a deterministic function of x_t. We call b_t the belief at time t instead of belief state.
State: the latent hidden state variable z.
-
__init__(x_dim, b_dim, z_dim, t, d, n_layers=2, n_lstm_layers=1, preproc_dim=None, add_sigmoid=True)[source]¶ Init class.
- Parameters
x_dim : int
the dimension of observed data.
b_dim : int
the belief code dimension.
z_dim : int
the dimension of latent space.
t : int
in jumpy state modeling, t1 can be chosen uniformly from the sequence U(1,t).
d : int
in jumpy state modeling, t2 − t1 can be chosen uniformly over some finite range U(1,d).
n_layers : int, default 2
the number of hierachical level in the model.
n_lstm_layers : int, default 1
the number of recurrent layers, eg setting this paramter to 2 would mean stacking two LSTMs together to form a stacked LSTM, with the second LSTM taking in outputs of the first LSTM and computing the final results.
preproc_dim : int, default None
the dimension of preprocessed observations. If not specified no preprocessing is applied.
add_sigmoid : bool, default True
apply sigmoid activation fct to the decoder.
-
Follow us