Hi,
Current formulation of dphs is
dphs = np.dot(dc, self.c)[:self.ys] + np.dot(do, self.o)[:self.ys] + np.dot(di, self.i)[:self.ys] + np.dot(df, self.f)[:self.ys]
I think it should be:
dphs = np.dot(dc * self.dtangent(c), self.c)[:self.ys] + np.dot(do * self.dtangent(o), self.o)[:self.ys] + \
np.dot(di * self.dtangent(i), self.i)[:self.ys] + np.dot(df * self.dtangent(f), self.f)[:self.ys]
dtangent is missing from the derivation. Is that correct?