# Layers is null for a MultiLayerNetwork object

**URL:** <https://community.konduit.ai/t/layers-is-null-for-a-multilayernetwork-object/1768>\
**Category:** Tuning Help\
**Created:** [February 3, 2022, 8:46am UTC](https://community.konduit.ai/t/layers-is-null-for-a-multilayernetwork-object/1768 "2022-02-03T08:46:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcabot](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/jcabot/32/700_2.png) [@jcabot](https://community.konduit.ai/u/jcabot)\
**Post date:** [February 3, 2022, 8:46am UTC](https://community.konduit.ai/t/layers-is-null-for-a-multilayernetwork-object/1768/1 "2022-02-03T08:46:47Z")

</div>

I’ve defined the following MultiLayerNetwork for an intent detection scenario (for a given user input I want to predict the intent that corresponds to that input). I’m trying to define a network with three layers: an embedding one for a BagOfWords (created from the training sentences in the intents definition), a hidden one and a final output one that returns the matching probabilities for every intent.

Two questions:

- Is there obviously wrong in my attempted architecture?
- When I create the model from this configuration, I don’t get any type of exception but the “layers” attribute is null (the model object itself is not)

See below the code I’m using. Thanks!

```auto
  int numOutputs = context.numberIntents();
        int vocabSize = context.getBagOfWords().getVocabCache().numWords();

        MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()
                .seed(seed)
                .weightInit(WeightInit.RELU)
                .updater(new Nesterovs(0.01, 0.9))
                .list()
                .layer(new EmbeddingLayer.Builder().nIn(vocabSize).nOut(24)
                        .activation(Activation.RELU)
                        .build())
                .layer(new DenseLayer.Builder().nIn(24).nOut(8)
                        .activation(Activation.RELU)
                        .build())
                .layer(new OutputLayer.Builder((LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD))  
                        .activation(Activation.SOFTMAX)
                        .nIn(8).nOut(numOutputs)
                        .build())
                .build();

        MultiLayerNetwork model = new MultiLayerNetwork((conf));

```
