Skip to content
Prev 2097 / 2152 Next

mclapply() hangs when keras-based neural networks are involved

Hi Simon,

thanks a lot for your answer. I also thought about writing some
functions to turn a trained NN into one that can be evaluated in R
more natively (I found several design decisions of 'keras' very
non-R-like).

Concerning your comment "you have to load the model into each
separately, nothing is shared and you have to restrict the resources",
I understand the former, but what do you mean by "restrict the
resources"? So the mclapply(1:5, function(b) aux(b), mc.cores = 2)
call in my minimal working example would need to be written such that
every aux() call loads the trained NN. But how could I restrict the
resources then? (Is there anything I need to pass to TF?).

Thanks & cheers,
M


On Fri, Aug 30, 2019 at 4:21 PM Simon Urbanek
<simon.urbanek at r-project.org> wrote:
Message-ID: <CAM3-KjbVxYD=eVfxXgeOiw0bKefSgrW3kEBfBOVc8BOAezUg_Q@mail.gmail.com>
In-Reply-To: <a9ccec82d01c45349e8fd3c71ab1dcab@connhm02.connect.uwaterloo.ca>