1

我想知道为什么需要在 DeepLearning4j 中神经网络的每个卷积层指定一个方法 .nOut()。输出的数量不是取决于内核的大小、步幅和输入的大小吗?它也只需要一个参数,如果我想在每个卷积层指定输出的宽度和长度,我该怎么做?当我尝试不使用此方法时,默认情况下我的输出为 0,这会在运行时引发 InvalidConfigurationException。

.layer(1, new ConvolutionLayer.Builder(kernelHeight, kernelWidth)
    .stride(verticalStride, horizontalStride)
    .nOut(numberOfOutputs)        //This is what I don't understand
    .activation(Activation.IDENTITY)
    .build()) 
4

0 回答 0