groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sterg <st...@teiemt.gr>
Subject GroovyLab and DeepLearning4j
Date Wed, 24 Apr 2019 12:23:46 GMT
Hi Jochen,


Thank you for your help!!

I took a different approach to exploit DeepLearning4j for GroovyLab, and 
it seems to work.

Specifically, the current build.gradle script can produce a fat jar,

with the DeepLearning4j libraries, with

gradle fatJar


 From this "fat" GroovyLab, DeepLearning4j libraries seem to work well 
(the Linux64GroovyLabDL4j.sh script runs this version)!


.. perhaps, GroovyLab+DeepLearning4j can become an interesting tool for 
machine learning practitioners!


Thank you!

Stergios





On 04/12/2019 10:01 PM, Jochen Theodorou wrote:
> On 12.04.19 11:15, sterg wrote:
>> Hi all,
>>
>> I tried to use in GroovyLab ?(https://github.com/sterglee/GroovyLab) the
>> ND4j Java scientific library
>> (https://github.com/deeplearning4j/deeplearning4j) , by placing the
>> corresponding .jar file at the classpath of GroovyShell.
>>
>> Unfortunately, it has problem to initialize the backends (i.e. native
>> code, e.g. OpenBLAS, Intell MKL, NVIDIA CUDA etc),
>>
>> and code such as
>>
>> x= org.nd4j.linalg.factory.Nd4j.rand(9,9)
>>
>> fails.
>
> It fails how and why?
>
>
>> With Java9's JShell such code works and it is possible to work with the
>> ND4j in a scripting MATLAB like style.
>>
>> But also by using the JShell's API from GroovyLab >
>> I have the same problem as with GroovyShell, i.e. backend initialization
>> failure.
>>
>> Also with GroovyConsole the backend isn't properly initialized.
>
> I assume it is a classloader setup problem. Without knowing details it
> is going to be difficult to answer something really useful though. If it
> is about native libraries it can also be that those are not found. Then
> it would be important to know how they are looked-up and such
>
> bye Jochen


Mime
View raw message