Custom DNN using Reward Modulated Inverted STDP Learning for Temporal Pattern Recognition