model.boolean_not ================= .. py:module:: model.boolean_not Attributes ---------- .. autoapisummary:: model.boolean_not.model Classes ------- .. autoapisummary:: model.boolean_not.BooleanNotNN Module Contents --------------- .. py:class:: BooleanNotNN(n_features: int) Bases: :py:obj:`torch.nn.Sequential` Implements a neural network model designed to apply the logical NOT operation to input features. This model consists of a single linear layer without bias, configured to negate each input feature. The weights of the layer are initialized to -1 for each feature, effectively performing the 'NOT' operation in a bitwise manner when the inputs are considered to be -1 or 1. Inherits from: torch.nn.Sequential: Parent class for implementing neural networks with modules defined in a sequential manner. Initializes a NOT model with a specified dimension for the input features. The initialized model consists of a single linear layer without bias. The weights of this layer are set to -1 for each input feature, enabling the layer to negate the values of all input features. :param n_features: The total number of features in the input data. This parameter determines the dimensionality of the input to the linear layer as well as the output dimension, allowing the model to apply the NOT operation to each feature independently. :type n_features: int .. py:data:: model