systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Boehm <mboe...@gmail.com>
Subject Re: Autoencoder codegen testing with R
Date Tue, 15 Jan 2019 10:28:47 GMT
yes, you're absolutely right - in this form, results would always 
differ. Even if we feed a seed to both R and DML scripts, the 
implementation of our rand is very different as we need to ensure that, 
given a seed, we generate the same data in local and distributed 
operations. Accordingly, we derive seeds for each 1K x 1K block from the 
initial seed.

For testing purposes, we usually use one of the following two 
approaches: (1) use constant matrices or sequences (matrix/seq), or (2) 
generate the random data outside and read it into both scripts. 
Accordingly, I would recommend to create a copy of the dml script, place 
it inside the test directory, and modify the script accordingly.

Regards,
Matthias

On 15/01/2019 05:40, Janardhan wrote:
> Hi,
> 
> I have replicated AutoEncoder-2layer script in R. But, can the output files
> (W1, b1, ...) will match the R script. (not matching in my implementation).
> 
> Because, we have used Rand functions without seed in dml script also R
> doesn't provide any Rand(.., seed=..) function. I have just used
> 
> *IN DML : Rand(m, n, min=-1, max=1)*
> *IN R: runif(n, min=-1, max=1) %*% matrix(1, m, 1) *
> 
> Should the results from Autoencoder-2layer.dml will match with that of R
> script.
> 
> Thanks,
> Janardhan
> 

Mime
View raw message