0
0

#0.前置き
javaで機械学習をしてみたくなった(pythonで2年くらい触っていた)
”DL4J”というものが提供されているので環境構築する
DL4J(https://mgubaidullin.github.io/deeplearning4j-docs/ja/quickstart#%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88%E3%82%AC%E3%82%A4%E3%83%89)

要求事項
・java 1.7以上(64ビットのみ対応)
・Apache Maven
・IntelliJ IDEA または Eclipse
・Git

#1.環境
Windows11・wsl2・ubuntu-20.04

##1.1.java確認
いつもの

$ sudo apt update 
$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)
$javac -version
javac 11.0.7

javaは11.0.7なので大丈夫

##1.2.Maven
確認

$ mvn -version
$: command not found

mavenを入れるところから

$ sudo apt install maven
$ mvn -version
Apache Maven 3.6.3

##1.3.IntelliJ IDEA
JetBrains ToolBoxをインストール
https://www.jetbrains.com/ja-jp/toolbox-app/

ToolboxからIDEA(無償版)をインストール

##1.4. Git

$ git clone git://git.kernel.org/pub/scm/git/git.git

##2.DL4Jのサンプル実行

$ git clone https://github.com/deeplearning4j/dl4j-examples.git
$ cd dl4j-examples/dl4j-examples/
$ mvn clean install

ここまですれば後はIDEAでサンプルプロジェクトを起動すれば実行できる!

Eclipseで実行している記事もあったが、知識不足から再現はできなかった

今後は自前のプログラムでDL4Jを動かしたい

#参考
https://mgubaidullin.github.io/deeplearning4j-docs/ja/quickstart
https://qiita.com/tamura__246/items/3893ec292284c7128069
https://zenn.dev/yu1ro/articles/b50fd110b8da73

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0