code: public static KerasLayer.DimOrder getDimOrderFromConfig(Map<String, Object> layerConfig,
                                                              KerasLayerConfiguration conf)
              throws InvalidKerasConfigurationException {
          Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf);
          KerasLayer.DimOrder dimOrder = KerasLayer.DimOrder.NONE;
          if (layerConfig.containsKey(conf.getLAYER_FIELD_BACKEND())) {
              String backend = (String) layerConfig.get(conf.getLAYER_FIELD_BACKEND());
              if (backend.equals("tensorflow") || backend.equals("cntk")) {
                  dimOrder = KerasLayer.DimOrder.TENSORFLOW;
              } else if (backend.equals("theano")) {
                  dimOrder = KerasLayer.DimOrder.THEANO;
              }
          }
          if (innerConfig.containsKey(conf.getLAYER_FIELD_DIM_ORDERING())) {
              String dimOrderStr = (String) innerConfig.get(conf.getLAYER_FIELD_DIM_ORDERING());
              if (dimOrderStr.equals(conf.getDIM_ORDERING_TENSORFLOW())) {
                  dimOrder = KerasLayer.DimOrder.TENSORFLOW;
              } else if (dimOrderStr.equals(conf.getDIM_ORDERING_THEANO())) {
                  dimOrder = KerasLayer.DimOrder.THEANO;
              } else {
                  log.warn("Keras layer has unknown Keras dimension order: " + dimOrder);
              }
          }
          return dimOrder;
      }
docs: Get Keras (backend) dimension order from Keras layer configuration.
  
  @param layerConfig dictionary containing Keras layer configuration
  @return Dimension order