code: @Override
      public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException {
          this.weights = new HashMap<>();
  
  
          INDArray W;
          if (weights.containsKey(conf.getKERAS_PARAM_NAME_W()))
              W = weights.get(conf.getKERAS_PARAM_NAME_W());
          else
              throw new InvalidKerasConfigurationException(
                      "Keras SimpleRNN layer does not contain parameter " + conf.getKERAS_PARAM_NAME_W());
          this.weights.put(SimpleRnnParamInitializer.WEIGHT_KEY, W);
  
  
          INDArray RW;
          if (weights.containsKey(conf.getKERAS_PARAM_NAME_RW()))
              RW = weights.get(conf.getKERAS_PARAM_NAME_RW());
          else
              throw new InvalidKerasConfigurationException(
                      "Keras SimpleRNN layer does not contain parameter " + conf.getKERAS_PARAM_NAME_RW());
          this.weights.put(SimpleRnnParamInitializer.RECURRENT_WEIGHT_KEY, RW);
  
  
          INDArray b;
          if (weights.containsKey(conf.getKERAS_PARAM_NAME_B()))
              b = weights.get(conf.getKERAS_PARAM_NAME_B());
          else
              throw new InvalidKerasConfigurationException(
                      "Keras SimpleRNN layer does not contain parameter " + conf.getKERAS_PARAM_NAME_B());
          this.weights.put(SimpleRnnParamInitializer.BIAS_KEY, b);
  
  
          if (weights.size() > NUM_TRAINABLE_PARAMS) {
              Set<String> paramNames = weights.keySet();
              paramNames.remove(conf.getKERAS_PARAM_NAME_B());
              paramNames.remove(conf.getKERAS_PARAM_NAME_W());
              paramNames.remove(conf.getKERAS_PARAM_NAME_RW());
              String unknownParamNames = paramNames.toString();
              log.warn("Attemping to set weights for unknown parameters: "
                      + unknownParamNames.substring(1, unknownParamNames.length() - 1));
          }
      }
docs: Set weights for layer.
  
  @param weights Simple RNN weights
  @throws InvalidKerasConfigurationException Invalid Keras configuration exception