mexca.video.helper_classes ========================== .. py:module:: mexca.video.helper_classes .. autoapi-nested-parse:: Helper classes for multi-dimensional edge feature-based AU relation graph (MEFARG) learning. Implementation of building blocks in the MEFARG model from the paper: Luo, C., Song, S., Xie, W., Shen, L., Gunes, H. (2022). Learning multi-dimentionsal edge feature-based AU relation graph for facial action unit recognition. *arXiv*. ``_ Code adapted from the `OpenGraphAU `_ code base (licensed under Apache 2.0). Classes ------- .. autoapisummary:: mexca.video.helper_classes.LinearBlock mexca.video.helper_classes.AUPredictor Module Contents --------------- .. py:class:: LinearBlock(in_features: int, out_features: Optional[int] = None, drop: float = 0.0) Apply transformations of multiple layers including a linear layer. :param in_features: Size of each input sample. :type in_features: int :param out_features: Size of each output sample. If `None`, uses `in_features`. :type out_features: int, optional, default=None :param drop: Probability of dropping (zeroing out) input features. :type drop: float, default=0.0 .. rubric:: Notes Applies four transformations: - Linear - 1D batch normalization - ReLU - Drop out regularization Linear layer weights are initialized with :math:`N(0, \sqrt{\frac{2}{out\_features}})`. Batch norm weights are initialized as 1 and biases as 0. .. py:class:: AUPredictor(in_features: int, n_main_nodes: int = 27, n_sub_nodes: int = 14) Meta class for predicting action unit (AU) activations