Eclipse 中的 Neuroph

Neuroph in Eclipse

我正在尝试在 Eclipse 中使用 Neuroph 神经网络库。自述文件指出:

要在您的 Java 应用程序中使用 Neuroph,请添加对 neuroph-core-x.x.jar(以及您要使用的所有其他 jar)的引用,并导入所需的 类。 此发行版的 lib 文件夹中提供了所需的所有其他第 3 方库。

我在我的项目构建路径中包含了 neuroph-core-x.x.jar 并导入了 org.neuroph.nnet., org.neuroph.core. ,org.neuroph.util.* 根据需要。当我从 lib 文件夹导入所有额外的第 3 方库时,我在 运行 多层感知器示例时收到错误:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/ajd/Desktop/neuroph-2.92/libs/slf4j-nop-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/ajd/Desktop/neuroph-2.92/libs/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.helpers.NOPLoggerFactory]

当我删除两个冲突的文件时,我收到以下错误:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

程序没有终止,只是继续显示上述错误,而没有做任何其他事情。

如果我删除其中一个冲突文件(但保留另一个),则它不会显示任何错误,但再次运行并且永远不会到达任何 result/output

我是否错过了一些额外的步骤?

  1. https://www.slf4j.org/download.html
  2. 下载并解压 slf4j-1.7.24.zip
  3. http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.17/log4j-1.2.17.zip

  4. 下载并解压 log4j-1.2.17.zip
  5. 将 jar 添加到您的项目:

slf4j-api-1.7.24.jar

slf4j-log4j12-1.7.24.jar

log4j-1.2.17.jar

neuroph-core-2.93.jar

这些罐子足够用于 MLP。

在第一个代码块中,SLF4J 告诉您有两个可用的 StaticLoggerBinder 实现 - 第一个(NOP,不记录任何内容)被使用。

您需要从类路径中排除或删除不需要的 JAR neuroph-2.92/libs/slf4j-nop-1.7.6.jar