code: public static int getNOutFromConfig(Map<String, Object> layerConfig,
                                          KerasLayerConfiguration conf) throws InvalidKerasConfigurationException {
          Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf);
          int nOut;
          if (innerConfig.containsKey(conf.getLAYER_FIELD_OUTPUT_DIM()))
              /* Most feedforward layers: Dense, RNN, etc. */
              nOut = (int) innerConfig.get(conf.getLAYER_FIELD_OUTPUT_DIM());
          else if (innerConfig.containsKey(conf.getLAYER_FIELD_EMBEDDING_OUTPUT_DIM()))
              /* Embedding layers. */
              nOut = (int) innerConfig.get(conf.getLAYER_FIELD_EMBEDDING_OUTPUT_DIM());
          else if (innerConfig.containsKey(conf.getLAYER_FIELD_NB_FILTER()))
              /* Convolutional layers. */
              nOut = (int) innerConfig.get(conf.getLAYER_FIELD_NB_FILTER());
          else
              throw new InvalidKerasConfigurationException("Could not determine number of outputs for layer: no "
                      + conf.getLAYER_FIELD_OUTPUT_DIM() + " or " + conf.getLAYER_FIELD_NB_FILTER() + " field found");
          return nOut;
      }
docs: Get number of outputs from Keras layer configuration.
  
  @param layerConfig dictionary containing Keras layer configuration
  @return Number of output neurons of the Keras layer
  @throws InvalidKerasConfigurationException Invalid Keras config