function E=grad(W,Inp,Tar,NNP) [Y,G,E]=TwoLayer(Inp,Tar,W,NNP);