Is it possible to view the features of a dagnet network?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ashley
am 30 Aug. 2018
Beantwortet: Philip Brown
am 4 Mai 2023
I'm trying to create examples of images that 'strongly activate' channels of convolutional layers of a CNN (see https://www.mathworks.com/help/nnet/examples/visualize-features-of-a-convolutional-neural-network.html).
I've tried using the function deepDreamImage() but it only works for SeriesNetwork types, which I cannot use because my network has filters in parallel. Is there an equivalent function or workaround I can use for a DAGnetwork?
act1 = activations(net,im,'conv1','OutputAs','channels')
works on my network but produces greyscale outputs and I'm looking for color images.
I tried:
layer=5;
channels=1:8;
I = deepDreamImage(net,layer,channels,'PyramidLevels',1);
MatLab Error: Error using deepDreamImage Expected input number 1, network, to be one of these types: SeriesNetwork Instead its type was DAGNetwork.
Thanks!
0 Kommentare
Akzeptierte Antwort
Elif BAYKAL
am 21 Nov. 2018
layer = 2;
name = net.Layers(layer).Name
net = SeriesNetwork(net.Layers);
channels = 1:56;
I = deepDreamImage(net,layer,channels,'PyramidLevels',1);
1 Kommentar
Stuart Whipp
am 10 Dez. 2018
Does the above answer yorur question? I've developed a function for activations of recurrent networks such as LSTM. This could possibly be amended to work for DAGs, though in my experience the DAG layers are listed at the end, after output layers (in terms of layer index).
You'd want to ensure you were removing only the layers after the one you're interested in (in terms of layer architecture sequence not index) and I'm guessing the layer selected would have to follow an addition/depth concat layer otherwise there'd be two parallel/disparate outputs? In essence, this method applies a regression layer at the end of a sliced network and so will only output from one layer as though it was the penultimate layer of a net. Hope that makes sense!
Weitere Antworten (1)
Philip Brown
am 4 Mai 2023
If you're looking for using the deepDreamImage function for DAGNetwork networks, that's supported from R2019b.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!