Search Results

A simple neural network with a fixed architecture: 3 fully connected layers, each followed by a square activation layer. More...

#include <SimpleNeuralNetPlain.h>

Public Member Functions

 SimpleNeuralNetPlain ()
Construct a network.
 
void loadh5 (const H5Parser &h5p, std::vector< std::string > names, std::vector< int > dims, int numFilledSlots)
Loads weights. More...
 
void predict (const DoubleMatrixArray &input, DoubleMatrixArray &output) const
Run prediction. More...
 

Public Attributes

SimpleFcPlainLayer fpl1
 
SimpleFcPlainLayer fpl2
 
SimpleFcPlainLayer fpl3
 
SimpleSquareActivationPlainLayer sapl
 

Friends

class SimpleNeuralNet
 

Detailed Description

A simple neural network with a fixed architecture: 3 fully connected layers, each followed by a square activation layer.

It works on plaintext data, stored as DoubleMatrixArray.

Member Function Documentation

◆ loadh5()

void helayers::SimpleNeuralNetPlain::loadh5 ( const H5Parser h5p,
std::vector< std::string >  names,
std::vector< int >  dims,
int  numFilledSlots 
)

Loads weights.

Parameters
[in]h5pH5Parser used to read file
[in]namesnames of layers
[in]dimssize of input vector for each layer, and size of final output
[in]numFilledSlotsbatch size

◆ predict()

void helayers::SimpleNeuralNetPlain::predict ( const DoubleMatrixArray input,
DoubleMatrixArray output 
) const

Run prediction.

Parameters
[in]inputinput data
[out]outputoutput prediction

The documentation for this class was generated from the following files:
  • /opt/IBM/FHE-distro/ML-HElib/src/helayers/simple_nn/SimpleNeuralNetPlain.h
  • /opt/IBM/FHE-distro/ML-HElib/src/helayers/simple_nn/SimpleNeuralNetPlain.cpp