code: public static double getDropoutFromConfig(Map<String, Object> layerConfig,
                                                KerasLayerConfiguration conf) throws InvalidKerasConfigurationException {
          Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf);
          /* NOTE: Keras "dropout" parameter determines dropout probability,
           * while DL4J "dropout" parameter determines retention probability.
           */
          double dropout = 1.0;
          if (innerConfig.containsKey(conf.getLAYER_FIELD_DROPOUT())) {
              /* For most feedforward layers. */
              try {
                  dropout = 1.0 - (double) innerConfig.get(conf.getLAYER_FIELD_DROPOUT());
              } catch (Exception e) {
                  int kerasDropout = (int) innerConfig.get(conf.getLAYER_FIELD_DROPOUT());
                  dropout = 1.0 - kerasDropout;
              }
          } else if (innerConfig.containsKey(conf.getLAYER_FIELD_DROPOUT_W())) {
              /* For LSTMs. */
              try {
                  dropout = 1.0 - (double) innerConfig.get(conf.getLAYER_FIELD_DROPOUT_W());
              } catch (Exception e) {
                  int kerasDropout = (int) innerConfig.get(conf.getLAYER_FIELD_DROPOUT_W());
                  dropout = 1.0 - kerasDropout;
              }
          }
          return dropout;
      }
docs: Get dropout from Keras layer configuration.
  
  @param layerConfig dictionary containing Keras layer configuration
  @return get dropout value from Keras config
  @throws InvalidKerasConfigurationException Invalid Keras config