Operations on sums inside functions in Maxima -
i trying compute derivative back-propagation analytically, using maxima. write:
declare(n,[scalar,integer]); declare(i,[scalar,integer]); declare(j,[scalar,integer]); declare(m,[scalar,integer]); declare(n,[scalar,integer]); assume(n>10); assume(i<=n,j<=n,m<=n,n<=n); x1(i):=f(sum(w[i,j]*x0[j],j,1,n));
now trying evaluate:
diff(x1(i),w[i,m])
and returns zero, while supposed return
f(...) * x0[m]
moreover, i've noticed x1(j)
returns
sum_j=1^n w[j,j] * x0[j]
while expect alter internal index j
other letter, j1
, return
sum_j1=1^n w[j,j1] * x0[j1]
is there way create maxima "smarter" in regards, i.e. create compute derivatives respect indeces , automatically alter letter when there conflict input?
about stuff diff(x1(i),w[i,m])
, unfortunately maxima can't handle it. have made progress on differentiating respect indexed variables, works 1 index, not two, have here. if have time work on extending 2 indices, short reply is, i'm afraid, can't done.
function sum backpropagation maxima
No comments:
Post a Comment