-
-
Save liweigu/7c33cebca0d7da503e032dee03f476f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
network: | |
GraphBuilder graphBuilder = builder.graphBuilder().backpropType(BackpropType.Standard).addInputs("inputs") | |
.addLayer("cnn1", | |
new ConvolutionLayer.Builder(new int[] { kernelSize1, kernelSize1 }, | |
new int[] { cnnStride1, cnnStride1 }, | |
new int[] { padding, padding }) | |
.nIn(channels) | |
.nOut(64) | |
inputPreProcessors.put("cnn1", new RnnToCnnPreProcessor(501, 501, channels)); | |
feature mask: | |
double[] inputMask = new double[sampleCount * size]; | |
for (int i = 0; i < 30; i++) { | |
inputMask[i] = 1; | |
} | |
featuresMask = Nd4j.create(inputMask, new int[] { size, sampleCount }); | |
DataSet dataSet = new DataSet(featureData, labelData, featuresMask, labelsMask); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment