使用dl4j和FCN网络进行语义分割

我已经签出了dl4j示例并执行了AnimalsClassification示例来成功进行测试。

我必须训练,评估和预测(使用)像UNet这样的语义分割算法,因为输入图像的大小与FCN的大小不同。

并改变了网络AnimalsClassification例子UNET从这个链接

https://github.com/deeplearning4j/deeplearning4j/blob/master/deeplearning4j/deeplearning4j-zoo/src/main/java/org/deeplearning4j/zoo/model/UNet.java

但出现错误。您能帮我解决这个错误吗?

错误:


SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

19:22:39,951 INFO  ~ Load data....

19:22:40,696 INFO  ~ Build model....

19:22:41,363 INFO  ~ Loaded [CpuBackend] backend

19:22:44,955 INFO  ~ Number of threads used for NativeOps: 2

19:22:45,555 INFO  ~ Number of threads used for BLAS: 2

19:22:45,562 INFO  ~ Backend used: [CPU]; OS: [Linux]

19:22:45,562 INFO  ~ Cores: [2]; Memory: [1.3GB];

19:22:45,562 INFO  ~ Blas vendor: [OPENBLAS]

19:22:56,425 WARN  ~ Layer "Layer not named" distribution is set but will not be applied unless weight init is set to WeighInit.DISTRIBUTION.

Exception in thread "main" java.lang.IllegalStateException: Invalid configuration: network has no inputs. Use .addInputs(String...) to label    (and give an ordering to) the network inputs

    at org.deeplearning4j.nn.conf.ComputationGraphConfiguration.validate(ComputationGraphConfiguration.java:279)

    at org.deeplearning4j.nn.conf.ComputationGraphConfiguration$GraphBuilder.build(ComputationGraphConfiguration.java:918)

    at org.deeplearning4j.examples.convolution.AnimalsClassification.graphBuilder(AnimalsClassification.java:443)

    at org.deeplearning4j.examples.convolution.AnimalsClassification.run(AnimalsClassification.java:145)

    at org.deeplearning4j.examples.convolution.AnimalsClassification.main(AnimalsClassification.java:447)


Process finished with exit code 1


慕运维8079593
浏览 165回答 1
1回答

HUX布斯

它说明堆栈跟踪中正确的错误。您需要在图形上调用setInputs。这类似于我们在底部设置输出的方式。请仔细阅读错误消息。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java