implement recurrent neural network and long short-term memory network from scratch without frameworks