Bottleneck flatten option

Discussions about research, Faceswapping and things that don't fit in the other categories here.


Locked
User avatar
Ryzen1988
Posts: 59
Joined: Thu Aug 11, 2022 8:31 am
Answers: 0
Location: Netherlands
Has thanked: 8 times
Been thanked: 28 times

Bottleneck flatten option

Post by Ryzen1988 »

This is a new function for me, so as far as i interpret it correctly flatten is more like -> no bottleneck.
Of course flatten happens always at the end of the encoder to make a long 1d vector, normally this goes into a smaller dense bottleneck or pooling bottleneck but with flatten you just pass this enormous vector strait to the dense layers.
I see in most cases it explodes the parameter count.
Can somebody explain what the best use case is for the use of flatten als bottleneck? :?:

Edit 1, seems like it is for the transformers

Last edited by Ryzen1988 on Sat Aug 05, 2023 3:20 pm, edited 1 time in total.
User avatar
torzdf
Posts: 2796
Joined: Fri Jul 12, 2019 12:53 am
Answers: 160
Has thanked: 142 times
Been thanked: 650 times

Re: Bottleneck flatten option

Post by torzdf »

Yes. This was added to effectively have as a "no bottleneck" option, which is only really relevant for the Visual Transformer encoder, but could conceivably be used for other encoders if they output a small enough tensor.

My word is final

Locked