NeuralNetwork#

class usencrypt.ai.nn.NeuralNetwork#

Neural network model for data encrypted with the USEncrypt® library. Its API allows data users to create, train, evaluate, save, and load neural network architectures.

Attributes
  • layers (list of usencrypt.ai.nn.layers.Layer) – List of layers in the neural network architecture.

  • is_encrypted (bool) – Defines if the neural network is using encrypted data.

  • loss (usencrypt.ai.losses.Loss) – The loss function used for the neural network.

  • optimizer (usencrypt.ai.optimizers.Optimizer) – The optimizer used to minimize the cost.

  • history (dict) – The history dictionary containing each updated performance metric per epoch.

Examples

For examples on how to work with the neural network model, please refer to our corresponding tutorials.

Methods

NeuralNetwork.add

Adds a layer instance to the neural network model.

NeuralNetwork.compile

Configures the neural network model for training.

NeuralNetwork.evaluate

Evaluates the neural network model with the given test set, returning the loss and performance metric results.

NeuralNetwork.fit

Trains the neural network model for a fixed number of epochs.

NeuralNetwork.load_model

Loads the configuration of a neural network model from a JSON file generated by the usencrypt.ai.nn.NeuralNetwork.save_model() function.

NeuralNetwork.predict

Uses the neural network model to generate predictions based on an input of samples.

NeuralNetwork.save_model

Saves the neural network model into a JSON file for future use.

NeuralNetwork.summary

Prints a summary of the neural network architecture.