code: private void javaToNative(byte[] network, byte[] parameters) {
      long now = System.currentTimeMillis();
      //existing state is fine
      if (_backend !=null
              // either not overwriting with user-given (new) state, or we already are in sync
              && (network == null || Arrays.equals(network,_network))
              && (parameters == null || Arrays.equals(parameters,_modelparams))) {
        Log.warn("No need to move the state from Java to native.");
        return;
      }
      if (_backend ==null) {
        _backend = createDeepWaterBackend(get_params()._backend.toString()); // new ImageTrain(_width, _height, _channels, _deviceID, (int)parameters.getOrMakeRealSeed(), _gpu);
        if (_backend == null) throw new IllegalArgumentException("No backend found. Cannot build a Deep Water model.");
      }
  
      if (network==null) network = _network;
      if (parameters==null) parameters= _modelparams;
      if (network==null || parameters==null) return;
      Log.info("Java state -> native backend.");
  
      initModel(network, parameters);
      long time = System.currentTimeMillis() - now;
      Log.info("Took: " + PrettyPrint.msecs(time, true));
    }
docs: Internal helper to create a native backend, and fill its state
  @param network user-given network topology
  @param parameters user-given network state (weights/biases)