code: public INDArray inferVector(@NonNull List<VocabWord> document, double learningRate, double minLearningRate,
                      int iterations) {
  
          if (this.vocab == null || this.vocab.numWords() == 0)
              reassignExistingModel();
  
          SequenceLearningAlgorithm<VocabWord> learner = sequenceLearningAlgorithm;
  
          if (learner == null) {
              synchronized (this) {
                  if (sequenceLearningAlgorithm == null) {
                      log.info("Creating new PV-DM learner...");
                      learner = new DM<>();
                      learner.configure(vocab, lookupTable, configuration);
                      sequenceLearningAlgorithm = learner;
                  } else {
                      learner = sequenceLearningAlgorithm;
                  }
              }
          }
  
          learner = sequenceLearningAlgorithm;
  
  
  
          if (document.isEmpty())
              throw new ND4JIllegalStateException("Impossible to apply inference to empty list of words");
  
  
          Sequence<VocabWord> sequence = new Sequence<>();
          sequence.addElements(document);
          sequence.setSequenceLabel(new VocabWord(1.0, String.valueOf(new Random().nextInt())));
  
          initLearners();
  
          INDArray inf = learner.inferSequence(sequence, seed, learningRate, minLearningRate, iterations);
  
          return inf;
      }
docs: This method calculates inferred vector for given document
  
  @param document
  @return