Rewrited neural network