Skip to main content
. 2023 Sep 6;23(18):7701. doi: 10.3390/s23187701
Algorithm 1: Pseudocode for Our SSA-SpiNNaker Model/Algorithm
      Data: IMDB Dataset loaded from the Keras library
      Result:
      Positive or Negative Review based on user inputs
  • Step 1:
    • Import all required python modules
    • Training dataset (train x, train y)
    • Test Dataset (test x, test y)
  • Step 2:
    • Initialize the ANN model as a sequential model
    • Define activation function
    • Add input layer
    • Add input layer
    • Add output layer
  • Step 3:
    • Compile the model
    • Train the model
    • Save the model
  • Step 4:
    • Convert ANN weights to synaptic weights
    • Initialize the SNN model from saved ANN model
    • Setup simulation environment
    • Initialize simulation parameters
  • Step 5: foreach: Time step in the simulation duration do

                                                       Foreach: For each layer in the SNN model: do

                                                                                  Foreach: For each neuron in the layer: do
    • Based on incoming spikes and weights update the neuron membrane potential.
    • If the membrane potential exceeds firing threshold, emit a spike.
    • By activating connected synapses, propagate the spike to next later.
  • Step 6:
    • Collect output spikes
    • Evaluate the performance of the model
    • Test the model with user provided reviews