Is it possible to view the features of a dagnet network?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ashley
le 30 Août 2018
Réponse apportée : Philip Brown
le 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 commentaires
Réponse acceptée
Elif BAYKAL
le 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 commentaire
Stuart Whipp
le 10 Déc 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!
Plus de réponses (1)
Philip Brown
le 4 Mai 2023
If you're looking for using the deepDreamImage function for DAGNetwork networks, that's supported from R2019b.
0 commentaires
Voir également
Catégories
En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!