Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6284 Why comment out the full connection layer for VGG16 #6348

Merged
merged 9 commits into from Sep 22, 2018
Expand Up @@ -27,6 +27,7 @@
import org.deeplearning4j.nn.conf.WorkspaceMode;
import org.deeplearning4j.nn.conf.inputs.InputType;
import org.deeplearning4j.nn.conf.layers.ConvolutionLayer;
import org.deeplearning4j.nn.conf.layers.DenseLayer;
import org.deeplearning4j.nn.conf.layers.OutputLayer;
import org.deeplearning4j.nn.conf.layers.SubsamplingLayer;
import org.deeplearning4j.nn.graph.ComputationGraph;
Expand Down Expand Up @@ -156,16 +157,16 @@ public ComputationGraphConfiguration conf() {
.layer(17, new SubsamplingLayer.Builder()
.poolingType(SubsamplingLayer.PoolingType.MAX).kernelSize(2, 2)
.stride(2, 2).build(), "16")
// .layer(18, new DenseLayer.Builder().nOut(4096).dropOut(0.5)
// .build())
// .layer(19, new DenseLayer.Builder().nOut(4096).dropOut(0.5)
// .build())
.layer(18, new OutputLayer.Builder(
.layer(18, new DenseLayer.Builder().nOut(4096).dropOut(0.5)
.build())
.layer(19, new DenseLayer.Builder().nOut(4096).dropOut(0.5)
.build())
.layer(20, new OutputLayer.Builder(
LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD).name("output")
.nOut(numClasses).activation(Activation.SOFTMAX) // radial basis function required
.build(), "17")
.setOutputs("18")

.build(), "19")
.setOutputs("20")
.backprop(true).pretrain(false)
.setInputTypes(InputType.convolutionalFlat(inputShape[2], inputShape[1], inputShape[0]))
.build();

Expand All @@ -181,7 +182,7 @@ public ComputationGraph init() {

@Override
public ModelMetaData metaData() {
return new ModelMetaData(new int[][] {inputShape}, 1, ZooType.CNN);
return null ;//new ModelMetaData(new int[][] {inputShape}, 1, ZooType.CNN);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this returning null?

}

@Override
Expand Down