How to config a multi-LSTM net with attentions?

I want config a multi-LSTM net with attentions like:

       int nIn = featuresCount;
        int layerIndex=0;
        for (int i = 0; i < this.rnnNeurons.length; ++i) {
            listBuilder.layer(layerIndex, new LSTM.Builder().activation(Activation.SOFTSIGN).nIn(nIn).nOut(rnnNeurons[i]).build());            
            nIn = rnnNeurons[i];
            int nhead=8;
            listBuilder.layer(layerIndex, new RecurrentAttentionLayer.Builder().activation(Activation.SOFTSIGN).nIn(nIn).nOut(nIn).nHeads(nhead).projectInput(true).build());

        listBuilder.layer(layerIndex, new RnnOutputLayer.Builder(new MSELoss())//
//        listBuilder.setInputType(InputType.recurrent(featuresCount));
        MultiLayerConfiguration conf =;

There is no exception after the program runs, but there is no display on the Training UI. How to configure it correctly?

It can work, just a little slow.

@cqiaoYc feel free to browse the examples. We cover all of that in there including the UI.
If something is “slow” did you measure it relative to a known peak performance so we know what “fast” is? Otherwise it’s kind of hard to tell if this is subjective or a real problem.

If we can first identify what “fast” is we can either fix your problem there or optimize your training pipeline a bit.