Flux: Obtaining individual layer output for DenseNet from Metalhead.jl

marcpabst
Wed, 06 Jul 2022 10:09:11 +0000
Machine Learning

Hi,

I’m training the DenseNet from Metalhead.jl on the CIFAR-10 dataset which generally seems to work quite well. However, I can’t seem to find out how to access the output from individual layers in the Chain.

I know about Flux.activations() but it just gives me an array of size size(Flux.activation(chain, input)[1]) = (1, 1, 1024, 1) which I’m not sure how to interpret. Is there any other way to save the output of an individual layer during a forward pass?

3 posts - 2 participants