O'Reilly logo

Java Deep Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

LSTM network construction

As stated earlier, I wrote a class called RecurrentNets.java to build an LSTM network. We create a MultilayerNetwork LSTM network that consists of an input layer, four LSTM layers, three dense layers, and an output layer. The input consists of sequences of genetic variants.

We use the BuildBuildLstmNetworks() method with two parameters—number of input for input layers and number of output for output layers, as shown here:

private static final int lstmLayer1Size = 128;private static final int lstmLayer2Size = 128;private static final int denseLayerSize = 32;private static final double dropoutRatio = 0.5;private static final int truncatedBPTTLength = 22;

Now, before we start creating and building the network, let's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required