Modified my previous attempt with stdp to reduce the load on the memory. It now loops through all the batches adding each calculation. I also added it to cpuSAIL.py and it only spends approx. 1% of the time in SAILNet actually calculating stdp.