简体   繁体   中英

Basic deeplearning4j classification example

I need a very basic classification or similar example for deeplearning4j framework.

I have the classic training set in form of pairs of already normalized double arrays [0.01, 0.45, 0.0, ....] -> [0.0, 0.1, 0.0, 0.0, ...] and need to:

  1. Build and train a simple feedforward neural network with N hidden layers
  2. Feed a set of uncategorized double arrays to trained network and get a set of output vectors

Could somebody please share a basic and short example that does this?

UPD: Something like this but for deeplearning4j would really help.

Take a look at this example which shows how to train a nn on an XOR relationship. First you have to convert your doubles into ndarrays. To do this use the Nd4j.create(...) method. Then you need to set up a dataset like here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM