NeuralNetPlain#
- class NeuralNetPlain#
A plaintext neural network that supports inference, consists of various plaintext layers.
- get_neural_net_config(self: pyhelayers.NeuralNetPlain) pyhelayers.NeuralNetConfig #
Returns non-const reference of the NN context used by the NN.
-
class NeuralNetPlain : public helayers::PlainModel#
A plaintext neural network that supports inference, consists of various plaintext layers.
For detailed documentation about loading NN from external formats, see NeuralNetOnnxParser.h and NeuralNetJsonParser.h
Public Functions
-
NeuralNetPlain()#
Construct an empty object.
-
~NeuralNetPlain()#
Destructor.
-
NeuralNetPlain(const NeuralNetPlain &src) = delete#
Deleted copy constructor.
-
NeuralNetPlain &operator=(const NeuralNetPlain &src) = delete#
Deleted operator=.
-
void initFromArch(const PlainModelHyperParams &hyperParams, const NeuralNetArch &arch)#
Initializes the NN from hyperparameters given NN architecture.
- Parameters:
hyperParams – The hyperparameters object.
arch – The NN architecture.
-
virtual std::vector<std::vector<DimInt>> getInputShapesForPredict() const override#
Returns the expected shapes of the inputs for predict.
If batch dimension is applicable, the value of the batch dimension is set to zero.
-
inline const NeuralNetArch &getArchitecture() const#
Returns the NN architecture used to initialize the NN.
-
inline const NeuralNetContext &getNeuralNetContext() const#
Returns the const NN context used by the NN.
-
inline NeuralNetContext &getNeuralNetContext()#
Returns the non-const NN context used by the NN.
-
inline const PlainLayer &getLayer(int index) const#
Returns a const reference to a layer of the NN.
- Parameters:
index – The index of the desired layer.
-
virtual std::shared_ptr<HeModel> getEmptyHeModel(const HeContext &he) const override#
Returns an empty HE NeuralNet object.
- Parameters:
he – the context
-
inline virtual std::string getClassName() const override#
Retunrs the name of this class.
-
NeuralNetPlain()#