Can';t在Linux中构建段落向量

Can';t在Linux中构建段落向量,linux,ubuntu,deep-learning,deeplearning4j,nd4j,Linux,Ubuntu,Deep Learning,Deeplearning4j,Nd4j,我将Doc2Vec算法与Deeplearning4j一起使用,当我在Windows 10 PC上运行它时,它工作正常,但是当我尝试在Linux机器上运行它时,我得到以下错误: java.lang.NoClassDefFoundError: Could not initialize class org.nd4j.linalg.factory.Nd4j at org.deeplearning4j.models.embeddings.inmemory.InMemoryLookupTable$Build

我将Doc2Vec算法与Deeplearning4j一起使用,当我在Windows 10 PC上运行它时,它工作正常,但是当我尝试在Linux机器上运行它时,我得到以下错误:

java.lang.NoClassDefFoundError: Could not initialize class org.nd4j.linalg.factory.Nd4j
at org.deeplearning4j.models.embeddings.inmemory.InMemoryLookupTable$Builder.<init>(InMemoryLookupTable.java:581) ~[run.jar:?]
at org.deeplearning4j.models.sequencevectors.SequenceVectors$Builder.presetTables(SequenceVectors.java:801) ~[run.jar:?]
at org.deeplearning4j.models.paragraphvectors.ParagraphVectors$Builder.build(ParagraphVectors.java:663) ~[run.jar:?]
这是我的pom.xml(版本都是0.7.1,但我一直在使用0.4-rc3.9,并得到了相同的错误):


org.deeplearning4j
深度学习4J用户界面模型
${dl4j.version}
org.slf4j
slf4j-log4j12
log4j
log4j
org.deeplearning4j
深度学习4J nlp
${dl4j.version}
org.slf4j
slf4j-log4j12
log4j
log4j
org.nd4j
nd4j本机
${nd4j.version}
org.slf4j
slf4j-log4j12
log4j
log4j
org.datavec
datavec api
${nd4j.version}

首先始终坚持使用最新版本。你能发布完整的堆栈跟踪吗?这绝对不是根本原因。或许可以尝试使用nd4j本机平台?通常这是缺少本机工件的问题。

谢谢,我使用了nd4j本机平台,现在它在Linux上运行。奇怪的是,我将它作为ApacheStorm集群的一部分使用,但仍然会遇到相同的错误,但它在本地集群上与本机平台一起工作,所以现在是一个风暴问题。
  LabelAwareSentenceIterator iter;
  iter = new LabelAwareListSentenceIterator(is, DELIM);
  iter.setPreProcessor(new SentencePreProcessor() {
    @Override
    public String preProcess(String sentence) {
      return new InputHomogenization(sentence).transform();
    }
  });

  TokenizerFactory tokenizerFactory = new DefaultTokenizerFactory();
  vec = new ParagraphVectors.Builder().minWordFrequency(minWordFrequency).batchSize(batchSize)
      .iterations(iterations).layerSize(layerSize).stopWords(stopWords).windowSize(windowSize)
      .learningRate(learningRate).tokenizerFactory(tokenizerFactory).iterate(iter).build();
  vec.fit();
<dependency>
        <groupId>org.deeplearning4j</groupId>
        <artifactId>deeplearning4j-ui-model</artifactId>
        <version>${dl4j.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.deeplearning4j</groupId>
        <artifactId>deeplearning4j-nlp</artifactId>
        <version>${dl4j.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.nd4j</groupId>
        <artifactId>nd4j-native</artifactId>
        <version>${nd4j.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.datavec/datavec-api -->
    <dependency>
        <groupId>org.datavec</groupId>
        <artifactId>datavec-api</artifactId>
        <version>${nd4j.version}</version>
    </dependency>