NeuralNetwork.summary#

usencrypt.ai.nn.NeuralNetwork.summary(self)#

Prints a summary of the neural network architecture.

Examples

Using this function allows users to see an overview of any usencrypt.ai.nn.NeuralNetwork model:

>>> import usencrypt as ue
>>> net = ue.ai.nn.NeuralNetwork()
>>> net.add(ue.ai.nn.layers.FCLayer(4, 3))
>>> net.add(ue.ai.nn.layers.ReluLayer())
>>> net.add(ue.ai.nn.layers.FCLayer(3, 2))
>>> net.add(ue.ai.nn.layers.SoftmaxLayer())
>>> net.summary()
Model: "NeuralNetwork"
=============================================================================
 Layer                    Type                Output Shape        Parameters
=============================================================================
 FCLayer                  FCLayer             (3, None)           15
 ReluLayer                ReluLayer           (3, None)           0
 FCLayer_1                FCLayer             (2, None)           8
 SoftmaxLayer             SoftmaxLayer        (2, None)           0
=============================================================================
 Total Parameters: 23
 Trainable Parameters: 23
 Non-Trainable Parameters: 0
=============================================================================