Different network architectures between downloaded and script-created networks - Tutorial: 3-D Brain Tumor Segmentation Using Deep Learning
2 ビュー (過去 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!