Neural Network FHE models.#

The list below contains pretrained network architecture classes. Note that these are not HE-Friendly models as they still include ReLU activations, which still need to be replaced.

Class name

Description

alexnet_fhe.alexnet_fhe

An AlexNet-based model with weights pretrained on Imagenet. To make the model HE-Friendly, the following changes were applied: - Batch normalizations were added after max-pooling layers (layers 2,5,12) - Adaptive average-pooling were removed - max-pooling was replaced by average-pooling

lenet5.Lenet5

A Lenet-5-based model.

resnet_clip.ClipResnet50_FHE

A ResNet50-based model.

resnet50.resnet_fhe

A ResNet50-based model.

squeezenetchet.SqueezeNetCHET

A Squeezenet-CHET-based model. To make the model HE-Friendly, the following changes were applied:

  • Batch normalizations were added after max-pooling layers (layers 2,5,12)

  • Adaptive average-pooling were removed

  • max-pooling was replaced by average-pooling

squeezenet.SqueezeNet1_0_FHE

A Squeezenet-based model with weights pretrained on ImageNet. To make the model HE-Friendly, the following changes were applied:

  • Batch normalizations were added after max-pooling layers (layers 2,5,12)

  • Adaptive average-pooling were removed

  • max-pooling was replaced by average-pooling

squeezenet.SqueezeNet1_1_FHE

A Squeezenet-based model with weights pretrained on ImageNet. To make the model HE-Friendly, the following changes were applied:

  • Batch normalizations were added after max-pooling layers (layers 2,5,12)

  • Adaptive average-pooling were removed

  • max-pooling was replaced by average-pooling

To generate a new model use the base class nn_module.

nn_module.nn_module()

This class serves as a wrapper for all the mltoolbox models.