Hi Mathias, Thanks for the explanation and inputs.
To answer your question about the work load, I'm trying to write a generic purpose DML script for Neural NetworK. That should be able to handle both small or large volume data sets. The step where I got stuck was I was trying to convert a Matlab function to DML which looks like as follows - weights_delta = eta*kron([inputs(sample_index,:), bias(sample_index)]', delta). Based on your inputs it seems that there is no direct way for now to achieve the same in DML. I suggest if thekron function can be added to the roadmap. Regards, Sourav On Tue, Dec 15, 2015 at 5:09 AM, Matthias Boehm <[email protected]> wrote: > just as an additional clarification: the construction of this permutation > matrix can also be vectorized as follows: > > #construct permutation matrix > N = nrow(X)*ncol(X)*nrow(Y); > Xvs = matrix(X, rows=nrow(X)*ncol(X), cols=1); > XvsRep = Xvs%*%matrix(1, rows=1, cols=nrow(Y)); > Xvl = matrix(XvsRep, rows=N, cols=1) > SRep = seq(1,nrow(Y))%*%matrix(1, rows=1, cols=nrow(X)*ncol(X)); > Svl = matrix(SRep, rows=N, cols=1) > P = table(seq(1,N), Svl, N, nrow(Y)) * Xvl; > > #scale and replicate Y > K = P %*% Y > > Note that the subexpression (table(seq(1,N), Svl, N, nrow(Y)) * Xvl) is > just a workaround for an existing bug in certain algebraic simplification > rewrites. I'll deliver the fix in the next couple of days, which will allow > (table(seq(1,N), > Svl, Xvl, N, nrow(Y))) as well. > > > Regards, > Matthias > > [image: Inactive hide details for Matthias Boehm---12/15/2015 09:03:27 > AM---Hi Sourav, well, we do not support Kronecker products K = k]Matthias > Boehm---12/15/2015 09:03:27 AM---Hi Sourav, well, we do not support > Kronecker products K = kron(X,Y) yet. However, as a > > From: Matthias Boehm/Almaden/IBM@IBMUS > To: [email protected] > Date: 12/15/2015 09:03 AM > Subject: Re: Is there any equivalent of kron function in DML ? > ------------------------------ > > > > Hi Sourav, > > well, we do not support Kronecker products K = kron(X,Y) yet. However, as > a workaround you could indeed create a custom permutation matrix P from X, > where > > P[1:nrow(Y),] = diag(matrix(as.scalar(X[1,1]),nrow(Y),1)) > P[nrow(Y)+1:2*nrow(Y),] = diag(matrix(as.scalar(X[1,2]),nrow(Y),1)) > ... > > and subsequently create a linearized output with > > K = P %*% Y > > Finally, we provide a reshape matrix constructor matrix(K, rows=..., > cols=...) that allows you to rearrange your entries as needed. If you run > this on large data for X, however, we might want to put this on the roadmap > for 2016. Could you share the characteristics of the workloads you have in > mind? > > > Regards, > Matthias > > Sourav Mazumder ---12/14/2015 11:56:52 PM---Hi, Is there any equivalent to > kron function (of Matlab) in DML ? > > From: Sourav Mazumder <[email protected]> > To: [email protected] > Date: 12/14/2015 11:56 PM > Subject: Is there any equivalent of kron function in DML ? > ------------------------------ > > > > Hi, > > Is there any equivalent to kron function (of Matlab) in DML ? > > Can I use the matrix multiplication %*% for the same ? > > Regards, > Sourav > > > >
