I think you should simplifythe equation and reduce the computational complexity as much as possible. It may also be helpful to check the implementation for errors or potential issues with the input parameters.
On Tuesday, 28 February 2023 at 21:35:24 UTC+5:30 [email protected] wrote: > Hi all, > I try to solve a non linear equation but it conitnue runiing since 48 > hours now. > `` > import sympy as sp > > X = sp.MatrixSymbol('X',2,2) > W = sp.MatrixSymbol('W',2,2) > Y = sp.MatrixSymbol('Y',1,2) > W_X = sp.MatMul(W,X.T) > > liste = [] > for i in range(W_X.shape[0]): > row = [] > for j in range(W_X.shape[1]): > row.append(1/(1+sp.exp(-W_X[i,j]))) > > liste.append(row) > sigmoid = sp.Matrix(liste) > > liste = [] > for i in range(Y.shape[0]): > row = [] > for j in range(Y.shape[1]): > row.append(sp.log(Y[i,j]/(1-Y[i,j]))) > liste.append(row) > log_Y = sp.Matrix(liste) > > test = sigmoid.inv() > > W2 = sp.MatMul(log_Y,test).as_explicit() > > liste = [] > for index in range(W2.shape[1]): > for i in range(W.shape[0]): > for j in range(W.shape[1]): > liste.append(W2[index].diff(W[i,j])) > > > p = sp.solve(liste,list(W),check=False,manual=True) > ``` > > > Do someone have an idea where i am wrong or if it is from sympy ? > > Thanks a lot > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/4f0e230c-7e07-4eb4-a084-fab849d66adcn%40googlegroups.com.
