SaxonRah / neural_geometric_algebra

neural network node with recurrent, convolutional, and geometric layers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neural_geometric_algebra

A basic Python example of a neural network node with feedforward, recurrent, convolutional, and geometric layers.

nga.py

100 lines!

neuron_feedforward = NeuralNode(layer_type='feedforward', weight=1.0)
neuron_recurrent = NeuralNode(layer_type='recurrent', weight=0.5, recurrent_weight=0.1)
neuron_convolutional = NeuralNode(layer_type='convolutional', filter_size=3)
ga_neuron = NeuralNode(layer_type='geometric_algebra', weight=1.0)

In the NeuralNode class, the feedforward method is a generic method that sets the input, calls the layer-specific feedforward method, and stores the output.

Each layer class overrides the feedforward method from the base NeuralNode class, providing a specific implementation tailored to the characteristics of the respective layer type.

nga_layers.py

150 lines!

network_architecture = [
    {'type': 'feedforward', 'params': {'weight': 1.0}},
    {'type': 'recurrent', 'params': {'weight': 0.5, 'recurrent_weight': 0.1}},
    {'type': 'convolutional', 'params': {'filter_size': 3}},
    {'type': 'geometric_algebra', 'params': {'weight': 1.0}}
]

# Create and initialize the neural network
neural_network = NeuralNode(network_architecture)

Here you can develop a layered network architechture.

nga_layers_trainer.py

Trains layered netwrok architechture.

About

neural network node with recurrent, convolutional, and geometric layers.

License:MIT License


Languages

Language:Python 100.0%