I need to train a model with a large amount of samples, e.g. MNIST data and run it in standalone mode. Before running the model, I store the target in a TimedArray and define the input Poisson spike neuron accordingly, and procedure to the running, i.e…
ta_img = TimedArray(img_array, dt=simulation_duration)
input_neurons.run_regularly('rate =ta_img(t, i)*Hz', dt=simulation_duration)
................
run(self.simulation_duration*(idx_end-idx_start) #idx_end and idx_start are the indices of the first and last sample
device.build(directory=self.standalone_code_name, compile=True, run=True, debug=False)
For example, to run 5s for 10K samples, (idx_end-idx_start) = 10000 and simulation_duration = 5s.
During the running, e.g. for sample 99, if one find the output does not meet the condition (e.g. the number of spikes is too small), and want to rerun the sample 99 with a different input spike rate without stopping the entire run, is there a simple way to do it?
Thanks