Different network architectures between downloaded and script-created networks - Tutorial: 3-D Brain Tumor Segmentation Using Deep Learning
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
In the tutorial 3-D Brain Tumor Segmentation Using Deep Learning, the network dowloaded directly from the MATLAB repository using the command
trained3DUnetURL = "https://www.mathworks.com/supportfiles/"+ ...
"vision/data/brainTumor3DUNetValid.mat";
downloadTrainedNetwork(trained3DUnetURL,dataDir);
is different than the network created following the tutorial instructions, in particular the commands
numChannels = 4;
inputPatchSize = [patchSize numChannels];
numClasses = 2;
[lgraph,outPatchSize] = unet3dLayers(inputPatchSize, ...
numClasses,ConvolutionPadding="valid");
outputLayer = dicePixelClassificationLayer(Name="Output");
lgraph = replaceLayer(lgraph,"Segmentation-Layer",outputLayer);
inputLayer = image3dInputLayer(inputPatchSize, ...
Normalization="none",Name="ImageInputLayer");
lgraph = replaceLayer(lgraph,"ImageInputLayer",inputLayer);
In the first case - downloaded network - the classification layer is at the end, while in the case of the created network this layer is before the cropping layers.
Does anybody have an explanation for this discrepancy?
Best,
Jacopo
댓글 수: 0
채택된 답변
Ben
2023년 9월 20일
Do you mean the order as described by lgraph.Layers? I can see that.
The order of lgraph.Layers is independent of the order the graph is executed in a network object. For example you can do the following:
lgraph = layerGraph();
lgraph = addLayers(lgraph,reluLayer(Name="addedFirst"));
lgraph = addLayers(lgraph,featureInputLayer(1,Name="addedSecond"));
lgraph = connectLayers(lgraph,"addedSecond","addedFirst");
This will have lgraph.Layers in the order that layers were added, but due to the input layer and connections data actually flows as "input -> addedSecond (input layer) -> addedFirst -> output". You can see this by calling analyzeNetwork(lgraph).
I suspect the reason is just that unet3dLayers constructs the graph in a different order than the saved .mat version of the network was created.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!