@Ignore @Test public void testsParallelFit1() throws Exception { final File file = Resources.asFile("big/raw_sentences.txt"); for (int i = 0; i < 1000; i++) { List<Thread> threads = new ArrayList<>(); for (int t = 0; t < 3; t++) { threads.add(new Thread(new Runnable() { @Override public void run() { try { TokenizerFactory t = new DefaultTokenizerFactory(); LabelsSource source = new LabelsSource("DOC_"); SentenceIteratorConverter sic = new SentenceIteratorConverter(new BasicLineIterator(file), source); ParagraphVectors vec = new ParagraphVectors.Builder().seed(42) .minWordFrequency(1).iterations(1).epochs(5).layerSize(100) .learningRate(0.05) .windowSize(5).trainWordVectors(true).allowParallelTokenization(false) .tokenizerFactory(t).workers(1).iterate(sic).build(); vec.fit(); } catch (Exception e) { throw new RuntimeException(e); } } })); } for (Thread t : threads) { t.start(); } for (Thread t : threads) { t.join(); } } }
@Override public void fit() { super.fit(); extractLabels(); }
ParagraphVectors extends Word2Vec { @Override public void fit() { super.fit(); extractLabels(); } }
ParagraphVectors extends Word2Vec { @Override public void fit() { super.fit(); extractLabels(); } protected  ParagraphVectors(); }
ParagraphVectors extends Word2Vec { @Override public void fit() { super.fit(); extractLabels(); } protected  ParagraphVectors(); @Deprecated String predict(String rawText); void setSequenceIterator(@NonNull SequenceIterator<VocabWord> iterator); String predict(LabelledDocument document); void extractLabels(); INDArray inferVector(String text, double learningRate, double minLearningRate, int iterations); INDArray inferVector(LabelledDocument document, double learningRate, double minLearningRate,
                    int iterations); INDArray inferVector(@NonNull List<VocabWord> document, double learningRate, double minLearningRate,
                    int iterations); INDArray inferVector(String text); INDArray inferVector(LabelledDocument document); INDArray inferVector(@NonNull List<VocabWord> document); Future<Pair<String, INDArray>> inferVectorBatched(@NonNull LabelledDocument document); Future<INDArray> inferVectorBatched(@NonNull String document); List<INDArray> inferVectorBatched(@NonNull List<String> documents); String predict(List<VocabWord> document); Collection<String> predictSeveral(@NonNull LabelledDocument document, int limit); Collection<String> predictSeveral(String rawText, int limit); Collection<String> predictSeveral(List<VocabWord> document, int limit); Collection<String> nearestLabels(LabelledDocument document, int topN); Collection<String> nearestLabels(@NonNull String rawText, int topN); Collection<String> nearestLabels(@NonNull Collection<VocabWord> document, int topN); Collection<String> nearestLabels(INDArray labelVector, int topN); @Deprecated double similarityToLabel(String rawText, String label); @Override void fit(); double similarityToLabel(LabelledDocument document, String label); double similarityToLabel(List<VocabWord> document, String label); String toJson(); static ParagraphVectors fromJson(String jsonString); }
ParagraphVectors extends Word2Vec { @Override public void fit() { super.fit(); extractLabels(); } protected  ParagraphVectors(); @Deprecated String predict(String rawText); void setSequenceIterator(@NonNull SequenceIterator<VocabWord> iterator); String predict(LabelledDocument document); void extractLabels(); INDArray inferVector(String text, double learningRate, double minLearningRate, int iterations); INDArray inferVector(LabelledDocument document, double learningRate, double minLearningRate,
                    int iterations); INDArray inferVector(@NonNull List<VocabWord> document, double learningRate, double minLearningRate,
                    int iterations); INDArray inferVector(String text); INDArray inferVector(LabelledDocument document); INDArray inferVector(@NonNull List<VocabWord> document); Future<Pair<String, INDArray>> inferVectorBatched(@NonNull LabelledDocument document); Future<INDArray> inferVectorBatched(@NonNull String document); List<INDArray> inferVectorBatched(@NonNull List<String> documents); String predict(List<VocabWord> document); Collection<String> predictSeveral(@NonNull LabelledDocument document, int limit); Collection<String> predictSeveral(String rawText, int limit); Collection<String> predictSeveral(List<VocabWord> document, int limit); Collection<String> nearestLabels(LabelledDocument document, int topN); Collection<String> nearestLabels(@NonNull String rawText, int topN); Collection<String> nearestLabels(@NonNull Collection<VocabWord> document, int topN); Collection<String> nearestLabels(INDArray labelVector, int topN); @Deprecated double similarityToLabel(String rawText, String label); @Override void fit(); double similarityToLabel(LabelledDocument document, String label); double similarityToLabel(List<VocabWord> document, String label); String toJson(); static ParagraphVectors fromJson(String jsonString);  }