That worked, thanks
Antonio
On Tue, Nov 26, 2013 at 2:48 PM, Dirk Eddelbuettel wrote:
>
> On 26 November 2013 at 14:26, Antonio Piccolboni wrote:
> | Hi all,
> | I have a list of lists, the inner lists all of the same lengths. I would
> like
> | to create a new list of lists such that ll[[i]
On 26 November 2013 at 14:26, Antonio Piccolboni wrote:
| Hi all,
| I have a list of lists, the inner lists all of the same lengths. I would like
| to create a new list of lists such that ll[[i]][[j]] == tll[[j]][[i]]`,
| where the old one is ll and the new one is tll. In R this can be achieved
Hi all,
I have a list of lists, the inner lists all of the same lengths. I would
like to create a new list of lists such that ll[[i]][[j]] ==
tll[[j]][[i]]`, where the old one is ll and the new one is tll. In R this
can be achieved by the function
f = splat(mapply.list)
mapply.list =
function
arma::mat pointer method worked; while I trying to get the same result with
arma::mat view without copying data, or passing the entire matrix seemed to
be laborious.
The following patter provides read/write access to some memory location
using armadillo matrix operations.
/*
* Contact: Steven Va
Thank you Simon for suggesting pointer then dereferencing it later in class
methods.
Dirk also suggested using matrix views which may have the same performance
while keeping syntax neat.
Will repost both working solution later on for the record.
Thanks again, I found all suggestion very helpful,
Thanks a lot again;
I will look at the views and see how that works out. The matrix size is not
modified inside of a layer but the content only (gradient) while the
optimizer outside of the instances modifies the weight matrix accoding to
gradients.
Storing all layers gradients and weights at one
Hi Steven
On 25 November 2013 at 23:23, Steven Varga wrote:
| Thank you Dirk for the quick response;
| and for noting the memory handling.
|
| I am aware of it and there are other ways of obtaining a pointer to some
memory
| location. I used malloc/free to put focus on arma::mat copying data du
Steve,
If you want to use a variable being an arma::mat obejct with varying memory,
you could use an arma::mat pointer. Otherwise if memory stays the same but
should be reusable in R, Dirk's suggestion initialising memory in R and passing
it to C++ is the most practicable way and very fast.
B