Starting a New ND4J Project

To create a new ND4J project within IntelliJ, either click on “Open Project” on IntelliJ’s opening screen, or click on the File/Open tab, and choose “nd4j.” If you have cloned the source files from Github, the directory should be available from IntelliJ.

To create a new ND4J project within IntelliJ, just put the right dependencies in your project’s POM.xml file. With those in place, Maven will be able to build ND4J for you. Pasting the right dependencies into your POM amounts to installing ND4J – no other install is necessary.

Select maven-archetype-quickstart.

The images below will walk you through the windows of the IntelliJ New Project Wizard using Maven. First, name your group and artifact as you please.

Click through the following screen with “Next”, and on the screen after that, name your project (“ND4J-test”, for example) and hit finish. Now go into your POM.xml file within the root of the new ND4J project in IntelliJ.

Update the POM file with the dependences you’ll need. These will vary depending on whether you’re running on CPUs or GPUs.

The default backend for CPUs is nd4j-native-platform, and for CUDA it isnd4j-cuda-7.5-platform. You can paste that into the<dependencies> ... </dependencies> section of your POM like this:

 xml
<dependency><groupId>org.nd4j</groupId><artifactId>nd4j-native-platform</artifactId><version>${nd4j.version}</version>
</dependency>

ND4J’s version is a variable here. It will refer to another line higher in the POM, in the<properties> ... </properties> section, specifying the nd4j version and appearing similar to this:

 xml
<nd4j.version></nd4j.version>

The dl4j version and DataVec version are also .

Version `` or higher now includes all backends by default and binaries for all platforms are automatically pulled. It is recommended to not alter this behaviorespecially if you are building on one platform but deploying to another (OS X vs. Linux). However, you can also explicitly pull binaries only for the platforms you are using. Information on how to do this can be found on thedependencies page.

import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;/*** Created by ESRI on 2017/11/4.*/
public class Test1 {public  static  void main(String args[]){INDArray x = Nd4j.create(new double[]{1, 2, 3, 4, 5, 6}, new int[]{3, 2});System.out.println(x);}
}
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
-- org.jblas INFO Starting temp DLL cleanup task.
[[1.00,2.00][3.00,4.00][5.00,6.00]]

参考:http://nd4j.org/getstarted

java深度学习(一)Maven创建一个新的ND4J工程相关推荐

  1. 使用maven创建一个简单的gwt工程

    (1)文件树 TodoListApp ├── pom.xml └── src └── main ├── java │   └── org │   └── gwtproject │   └── tuto ...

  2. 如何创建一个新的Node项目

    首先 现在正在做一个关于 vue-element-admin + node.js 的中后天开发的小项目.那么今天记录一下怎么创建一个新的node工程呢? 第一 找到要创建工程的文件夹位置,cmd(以管 ...

  3. idea maven创建java项目_新版本IntelliJ IDEA 构建maven,并用Maven创建一个web项目(图文教程)...

    之前都没试过用maven来管理过项目,但是手动找包导包确实不方便,于是今天用2016版的IDEA进行了maven的初尝试. 打开IDEA,创建新项目: 然后选择Maven,以及选择自己电脑的jdk: ...

  4. 如何在Java中创建一个新的List

    本文翻译自:How to make a new List in Java We create a Set as: 我们创建一个Set为: Set myset = new HashSet() How d ...

  5. Extjs6 --- 学习笔记(1)创建一个新项目

    原公司使用的前端框架是Extjs,于是系统学习了Extjs的4和6.旧东家的项目主要为后台管理系统,因此对前端界面UI的要求并不高,侧重于数据的展示与处理  ,刚开始使用的是Extjs4,后升级成6. ...

  6. Android IoT开发实战 | 04 - 创建一个新的活动Activity(登录界面)

    本系列IoT App开发笔记系b站视频教程学习笔记,视频地址: [7天Java0基础速成安卓开发]Day1 Android工程代码是怎么运行的 [7天Java0基础速成安卓开发]Day2 常用控件和界 ...

  7. java深度学习人脸检测、特征提取、人脸对比

    网上几乎没有关于java使用深度学习的人脸识别完整的源码,这个是我进半年来自己摸索出来的,现在开源出来,希望对喜欢人脸识别的java社区有帮助. 人脸识别分为以下3步骤完成: 1.人脸定位,也叫人脸检 ...

  8. 01_创建一个新的activityactivity配置清单文件

    今天开始学四大组件.今天是学Activity,然后是广播接收者,然后是服务,然后是内容提供者.四大组件,咱们一天一个.Activity就是跟用户交互的界面,大部分的应用都不会只有这么一个界面.创建多个 ...

  9. 《Effect Java》学习笔记1———创建和销毁对象

    第二章 创建和销毁对象 1.考虑用静态工厂方法代替构造器 四大优势: i. 有名称 ii. 不必在每次调用它们的时候都创建一个新的对象:   iii. 可以返回原返回类型的任何子类型的对象: JDBC ...

最新文章

  1. JS的表单序列化,数组去重,判断数组是否重复等方法
  2. 最大字段和各种不同算法实现(参考编程珠玑)
  3. 枚举类型用法_Mybatis-plus常见用法总结三
  4. 计算机维护系统Win8PE,win8如何进入PE重装电脑系统
  5. 使用Quartus进行功能仿真时出现“testbench_vector_input_file option does not exist”的解决方法
  6. java B2B2C Springboot多租户电子商城系统-Eureka源码解析...
  7. linux上clion使用教程,linux clion使用教程
  8. Ubuntu 设置 samba共享文件夹
  9. 最小生成树——贪心算法
  10. win10+Vs2019编译PCL中Kinfu-largescale
  11. 陈年老调-log4j(分环境配置+动态修改)
  12. 淘宝/天猫、1688、京东按图搜索淘宝商品(拍立淘)API接口
  13. chmod 权限详细解析(rw)
  14. 颜色直方图匹配(一)
  15. WPF MVVM Livecharts 柱状图
  16. 尚医通笔记-后台管理
  17. php技术逻辑思维图,PHP 逻辑思维题
  18. 认知SaaS产品和MVP流程
  19. macos 10.15 软件损坏/无法验证开发者
  20. git pull时遇到的问题

热门文章

  1. 极简代码:1012 数字分类 (20分)
  2. NIO Buffer
  3. HashMap 1.7 死循环过程
  4. Python数据结构学习笔记——搜索与排序算法
  5. 了解TCP协议,IP协议、ICMP协议和ARP协议(TCP报文,TCP的分成管理,TCP与UDP,TCP的三次握手四次挥手原理)
  6. java.lang.UnsatisfiedLinkError:org.apache.hadoop.io.nativeio.NativeIO$Windows.access0
  7. jxl操作excel(合并单元格,设置背景色,字体颜色)
  8. win7硬盘安装过程图解
  9. 成员缩写_「gnps,nbcs」是什么意思?00后饭圈缩写你看懂多少
  10. 工业机器人打磨抛光编程员工资_让我们一起来谈谈,工业机器人行业的真实工资是多少?...