A dictionary that contains the hyper-parameters of Network_Graves.
| 25 | |
| 26 | |
| 27 | class ParamGraves(HyperParams): |
| 28 | """ |
| 29 | A dictionary that contains the hyper-parameters of Network_Graves. |
| 30 | """ |
| 31 | |
| 32 | def __init__( |
| 33 | self, |
| 34 | dim_x: int = HyperParams.TBD.INT, # dimension of the input |
| 35 | dim_c: int = HyperParams.TBD.INT, # dimension of the content |
| 36 | dim_p: int = HyperParams.TBD.INT, # dimension of the output |
| 37 | dim_z: int = 0, # dimension of the optional z |
| 38 | # attn_rnn |
| 39 | num_attn_rnn_layers: int = 1, # number of layers of the attn_rnn |
| 40 | dim_attn_rnn: T.Union[int, T.Sequence[int]] = 512, # dimension of the attn_rnn |
| 41 | # attn_layer |
| 42 | num_window_attn_mixtures: int = 10, # number of mixtures in the gaussian attention layer |
| 43 | num_window_attn_layers: int = 1, # number of layers in the gaussian attention layer |
| 44 | dim_window_attn_layers: T.Union[int, T.Sequence[int]] = 128, # , len = num_window_attn_layers-1 |
| 45 | # decode_rnn |
| 46 | num_decode_rnn_layers: int = 2, |
| 47 | dim_decode_rnn: int = 512, |
| 48 | # output_layer |
| 49 | output_layer_type: str = "StackedLinearLayers", |
| 50 | feed_z_to_decode_rnn: bool = True, |
| 51 | num_output_layers: int = 1, # int |
| 52 | dim_output_layers: T.Union[int, T.Sequence[int]] = 128, |
| 53 | # T.Union[int, T.Sequence[int]], len = num_output_layers-1 |
| 54 | output_layer_nonlinearity="relu", |
| 55 | output_layer_add_norm_layer=False, |
| 56 | output_layer_norm_fun: T.Callable = torch.nn.LayerNorm, |
| 57 | output_layer_dropout_prob: float = 0, |
| 58 | output_layer_normalize: bool = True, |
| 59 | output_layer_normalize_first: bool = True, |
| 60 | output_layer_init_freq_first_layer: float = 1.0, |
| 61 | output_layer_init_freq_other_layer: float = 25.0, |
| 62 | # style mapping layer |
| 63 | num_mapping_layers: int = 4, |
| 64 | dim_mapping_layers: int = 256, |
| 65 | mapping_layer_nonlinearity: str = "silu", |
| 66 | mapping_layer_dropout_prob: float = 0.0, |
| 67 | ): |
| 68 | """ |
| 69 | Args: |
| 70 | dim_x: int |
| 71 | Dimension of the past input sequence xs |
| 72 | dim_c: int |
| 73 | Dimension of the content cs |
| 74 | dim_p: int |
| 75 | Output feature dimension of the network |
| 76 | dim_z: int = 0 |
| 77 | Dimension of an additional latent vector zt if zt_fun is provided in forward. Default: 0 |
| 78 | |
| 79 | .. attn_rnn |
| 80 | |
| 81 | num_attn_rnn_layers: int = 1 |
| 82 | Number of layers in the attention lstm |
| 83 | dim_attn_rnn: T.Union[int, T.Sequence[int]] = 512 |
| 84 | Dimension of the attention lstm. Can be a single integer or a list, one for each layer. |