Purpose and implementation of 're-flatten' Layer in Vision Transformer

조회 수: 3 (최근 30일)
HK ZHOU
HK ZHOU 2023년 9월 21일
답변: Tijue 2024년 2월 12일
In MATLAB 2023b's Computer Vision Toolbox, there is a pre-trained vision Transformer model that includes patch embedding and re-flatten layers. What is the purpose of the re-flatten layer? Additionally, it seems that there is no "re-flatten" function in the Deep Learning Toolbox. Do I need to write this function myself?
  댓글 수: 2
xingxingcui
xingxingcui 2024년 1월 4일
I only see patch embedding layer,flatten layer,can't find re-flaten layers in MATLAB 2023b,can you post the re-flaten layer link?
HK ZHOU
HK ZHOU 2024년 1월 5일
Thanks for your comment.
After executing the following codes, in the NetworkAnalyzer, the 're-flatten' function is visible, but cannot find the source code.
net = visionTransformer;
analyzeNetwork(net)

댓글을 달려면 로그인하십시오.

답변 (1개)

Tijue
Tijue 2024년 2월 12일
Hello Zhou,
You can open the "visionTransformer" function and find the "re-flatten" layer at line 67.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by