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
ComputationGraphConfiguration.GraphBuilder graph = new NeuralNetConfiguration.Builder().seed(seed) | |
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) | |
.updater(new Adam(0.0001)) | |
.weightInit(new NormalDistribution(0.0, 0.01)) | |
.biasInit(0) | |
.miniBatch(true) | |
.cacheMode(cacheMode) | |
.trainingWorkspaceMode(workspaceMode) | |
.inferenceWorkspaceMode(workspaceMode) | |
.graphBuilder(); |
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
Exception in thread "main" org.deeplearning4j.nn.modelimport.keras.exceptions.InvalidKerasConfigurationException: Requires model configuration as either JSON or YAML string.. For more information, see http://deeplearning4j.org/model-import-keras. | |
at org.deeplearning4j.nn.modelimport.keras.utils.KerasModelUtils.parseModelConfig(KerasModelUtils.java:333) | |
at org.deeplearning4j.nn.modelimport.keras.KerasModel.<init>(KerasModel.java:120) | |
at org.deeplearning4j.nn.modelimport.keras.KerasModel.<init>(KerasModel.java:96) | |
at org.deeplearning4j.nn.modelimport.keras.utils.KerasModelBuilder.buildModel(KerasModelBuilder.java:307) | |
at ma.enset.brain_tumor_segmentation.SemanticSegmentationLoadKeras.run(SemanticSegmentationLoadKeras.java:55) | |
at ma.enset.brain_tumor_segmentation.SemanticSegmentationLoadKeras.main(SemanticSegmentationLoadKeras.java:138) |
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
Exception in thread "main" org.deeplearning4j.nn.modelimport.keras.exceptions.InvalidKerasConfigurationException: Model configuration attribute missing from C:\Users\bismi\AppData\Local\Temp\DL4JKerasModelImport3875863276192533560.bin archive.. For more information, see http://deeplearning4j.org/model-import-keras. | |
at org.deeplearning4j.nn.modelimport.keras.utils.KerasModelBuilder.modelHdf5Filename(KerasModelBuilder.java:230) | |
at org.deeplearning4j.nn.modelimport.keras.KerasModelImport.importKerasModelAndWeights(KerasModelImport.java:171) | |
at org.deeplearning4j.nn.modelimport.keras.KerasModelImport.importKerasModelAndWeights(KerasModelImport.java:73) | |
at ma.enset.brain_tumor_segmentation.SemanticSegmentationLoadKeras.run(SemanticSegmentationLoadKeras.java:49) | |
at ma.enset.brain_tumor_segmentation.SemanticSegmentationLoadKeras.main(SemanticSegmentationLoadKeras.java:132) |
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
Exception in thread "main" org.deeplearning4j.nn.modelimport.keras.exceptions.InvalidKerasConfigurationException: Model configuration attribute missing from C:\Users\bismi\AppData\Local\Temp\DL4JKerasModelImport3875863276192533560.bin archive.. For more information, see http://deeplearning4j.org/model-import-keras. | |
at org.deeplearning4j.nn.modelimport.keras.utils.KerasModelBuilder.modelHdf5Filename(KerasModelBuilder.java:230) | |
at org.deeplearning4j.nn.modelimport.keras.KerasModelImport.importKerasModelAndWeights(KerasModelImport.java:171) | |
at org.deeplearning4j.nn.modelimport.keras.KerasModelImport.importKerasModelAndWeights(KerasModelImport.java:73) | |
at ma.enset.brain_tumor_segmentation.SemanticSegmentationLoadKeras.run(SemanticSegmentationLoadKeras.java:49) | |
at ma.enset.brain_tumor_segmentation.SemanticSegmentationLoadKeras.main(SemanticSegmentationLoadKeras.java:132) |
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
package ma.enset.brain_tumor_segmentation; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.util.Arrays; | |
import org.datavec.api.io.labels.PathLabelGenerator; | |
import org.datavec.api.writable.NDArrayWritable; | |
import org.datavec.api.writable.Writable; |
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
/******************************************************************************* | |
* Copyright (c) 2015-2018 Skymind, Inc. | |
* | |
* This program and the accompanying materials are made available under the | |
* terms of the Apache License, Version 2.0 which is available at | |
* https://www.apache.org/licenses/LICENSE-2.0. | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
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
package ma.enset.brain_tumor_segmentation; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.CacheMode; | |
import org.deeplearning4j.nn.conf.ComputationGraphConfiguration; | |
import org.deeplearning4j.nn.conf.ConvolutionMode; | |
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; | |
import org.deeplearning4j.nn.conf.WorkspaceMode; | |
import org.deeplearning4j.nn.conf.inputs.InputType; | |
import org.deeplearning4j.nn.conf.layers.Cnn3DLossLayer; |
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
Exception in thread "main" org.deeplearning4j.exception.DL4JInvalidInputException: Got rank 4 array as input to Convolution3DLayer (layer name = conv1-1, layer index = 1) with shape [1, 1, 256, 256]. Expected rank 5 array with shape [minibatchSize, numChannels, inputHeight, inputWidth, inputDepth]. (layer name: conv1-1, layer index: 1, layer type: Convolution3DLayer) | |
at org.deeplearning4j.nn.layers.convolution.Convolution3DLayer.preOutput(Convolution3DLayer.java:189) | |
at org.deeplearning4j.nn.layers.convolution.ConvolutionLayer.activate(ConvolutionLayer.java:437) | |
at org.deeplearning4j.nn.graph.vertex.impl.LayerVertex.doForward(LayerVertex.java:111) | |
at org.deeplearning4j.nn.graph.ComputationGraph.ffToLayerActivationsInWS(ComputationGraph.java:2116) | |
at org.deeplearning4j.nn.graph.ComputationGraph.computeGradientAndScore(ComputationGraph.java:1369) | |
at org.deeplearning4j.nn.graph.ComputationGraph.computeGradientAndScore(ComputationGraph.java:1338) | |
at org.deeplearning4j.optimize.solvers.BaseOptimizer.gradien |
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
public ComputationGraphConfiguration.GraphBuilder unetBuilder() { | |
ComputationGraphConfiguration.GraphBuilder graph = new NeuralNetConfiguration.Builder().seed(seed) | |
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) | |
.updater(updater) | |
.weightInit(weightInit) | |
.l2(5e-5) | |
.miniBatch(true) | |
.cacheMode(cacheMode) | |
.trainingWorkspaceMode(workspaceMode) |
NewerOlder