Créez un environnement arch linux (dernier environnement java (openjdk), installez également Ruby) (https://qiita.com/elect/items/328c28c310b385de7d23)
Ensuite, téléchargez le fichier jar de jblas. (À partir de la mise en route-> Téléchargez le fichier jar à partir de la page de téléchargement)
Essayez normalement java -server -jar jblas-1.4.2.jar.
Une erreur comme celle-ci est renvoyée
java -jar jblas-1.2.4.jar
-- org.jblas INFO jblas version is 1.2.4
Simple benchmark for jblas
Running sanity benchmarks.
checking vector addition... ok
-- org.jblas CONFIG BLAS native library not found in path. Copying native library from the archive. Consider installing the library somewhere in the path (for Windows: PATH, for Linux: LD_LIBRARY_PATH).
-- org.jblas CONFIG ArchFlavor native library not found in path. Copying native library libjblas_arch_flavor from the archive. Consider installing the library somewhere in the path (for Windows: PATH, for Linux: LD_LIBRARY_PATH).
-- org.jblas CONFIG Loading libjblas_arch_flavor.so from /lib/static/Linux/amd64/, copying to libjblas_arch_flavor.so.
-- org.jblas ERROR Couldn't load copied link file: java.lang.UnsatisfiedLinkError: /tmp/jblas5239787082843388211/libjblas_arch_flavor.so: libgfortran.so.3: cannot open shared object file: No such file or directory.
On Linux 64bit, you need additional support libraries.
You need to install libgfortran3.
For example for debian or Ubuntu, type "sudo apt-get install libgfortran3"
For more information, see
https://github.com/mikiobraun/jblas/wiki/Missing-Libraries
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.jblas.NativeBlas.dgemm(CCIIID[DII[DIID[DII)V
at org.jblas.NativeBlas.dgemm(Native Method)
at org.jblas.SimpleBlas.gemm(SimpleBlas.java:247)
at org.jblas.DoubleMatrix.mmuli(DoubleMatrix.java:1781)
at org.jblas.DoubleMatrix.mmul(DoubleMatrix.java:3138)
at org.jblas.util.SanityChecks.checkMatrixMultiplication(SanityChecks.java:91)
at org.jblas.util.SanityChecks.main(SanityChecks.java:182)
at org.jblas.benchmark.Main.main(Main.java:114)
-- org.jblas INFO Deleting /tmp/jblas5239787082843388211/libjblas_arch_flavor.so
-- org.jblas INFO Deleting /tmp/jblas5239787082843388211
En bref, cela signifie que libgfortran.so.3 est introuvable.
Installez gcc-6. (yaourt -S gcc6) Vous aurez besoin de libgfortran.so.3 qui est inclus dans ce
Lien avec sudo ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/6.XX/libgfortran.so.3 / usr / lib /
(6.XX est le nom de la version) / Collez-le sous usr / lib
(écrivez-le avec un chemin absolu)
Essayez à nouveau java -server -jar jblas-1.2.4.jar
et cela fonctionne bien
java -server -jar jblas-1.2.4.jar
-- org.jblas INFO jblas version is 1.2.4
Simple benchmark for jblas
Running sanity benchmarks.
checking vector addition... ok
-- org.jblas CONFIG BLAS native library not found in path. Copying native library from the archive. Consider installing the library somewhere in the path (for Windows: PATH, for Linux: LD_LIBRARY_PATH).
-- org.jblas CONFIG ArchFlavor native library not found in path. Copying native library libjblas_arch_flavor from the archive. Consider installing the library somewhere in the path (for Windows: PATH, for Linux: LD_LIBRARY_PATH).
-- org.jblas CONFIG Loading libjblas_arch_flavor.so from /lib/static/Linux/amd64/, copying to libjblas_arch_flavor.so.
-- org.jblas CONFIG Loading libjblas.so from /lib/static/Linux/amd64/sse3/, copying to libjblas.so.
checking matrix multiplication... ok
checking existence of dsyev...... ok
[-0.210656, -0.640445, -0.451188; -0.509085, -0.116445, 0.796815; -0.807515, 0.407556, -0.398408; 0.210656, 0.640445, -0.052780]
[17.233688; 1.414214; 0.000000]
[-0.470605, 0.782218, 0.408248; -0.571449, 0.082339, -0.816497; -0.672293, -0.617540, 0.408248]
[17.233688; 1.414214; 0.000000]
checking existence of dgesvd...... ok
Checking complex return values... (z = -21.0 + 88.0i)
Check whether we're catching XERBLA errors. If you see something like "** On entry to DGEMM parameter number 4 had an illegal value", it didn't work!
checking XERBLA... ok
Sanity checks passed.
Each benchmark will take about 5 seconds...
Running benchmark "native matrix multiplication, single precision".
n = 10 : 1.281 GFLOPS (3203374 iterations in 5.0 seconds)
n = 100 : 11.192 GFLOPS (27980 iterations in 5.0 seconds)
n = 1000 : 18.981 GFLOPS (48 iterations in 5.1 seconds)
-- org.jblas INFO Deleting /tmp/jblas6793705967272229922/libjblas.so
-- org.jblas INFO Deleting /tmp/jblas6793705967272229922/libjblas_arch_flavor.so
-- org.jblas INFO Deleting /tmp/jblas6793705967272229922
Vous pouvez maintenant utiliser jblas.
Je veux commencer l'apprentissage automatique, mais je ne veux pas partir d'un endroit que je ne comprends pas du coup! C'est un livre pour les gens qui disent. Vous pouvez apprendre un large éventail de la dérivation de la moyenne à la classification et à la régression. De plus, le code source peut être trouvé à ici, donc si vous voulez voir ce que vous pouvez faire pour le moment, vous voudrez peut-être l'essayer ici.
Recommended Posts