t-sne visualization of Vision transformer

5 visualizaciones (últimos 30 días)
MAHMOUD EID
MAHMOUD EID el 28 de Feb. de 2024
Comentada: adolf hitler el 15 de Mayo de 2024
How to visualize the features of the vision transfomer after training using t-sne visualizion?
I could not apply the same in vision transformer beacuse there are an error during using actication function as follows:
earlyLayerName = "'encoderblock1_mha1";
pool1Activations = activations(net,...
augimdsTrain,earlyLayerName,"OutputAs","rows");

Respuestas (1)

Garmit Pant
Garmit Pant el 5 de Mzo. de 2024
From what I gather, you are following the MATLAB examples “Train Vision Transformer Network for Image Classification” and “View Network Behavior Using tsne” to visualise the results of the network activations of a trained vision transformer. You are encountering an error in the process.
The line of code where you are encountering the error is trying to refer to a non-existent layer, assuming you are using the MATLAB default implementation of the “visionTransformer” network. By analysing the network, we can see the layer is named “encoderblock1_mha” and not “encoderblock1_mha1”. Unless you have renamed and replaced the layer, passing the correct layer name shall eliminate the result.
I hope you find the above explanation and suggestions useful!
  5 comentarios
adolf hitler
adolf hitler el 15 de Mayo de 2024
Hi Garmit
Have you solved the problem? I had the same problem when I was executing code.
adolf hitler
adolf hitler el 15 de Mayo de 2024
Hi Mahmoud
Have you solved the problem? I had the same problem when I was executing code.

Iniciar sesión para comentar.

Categorías

Más información sobre Recognition, Object Detection, and Semantic Segmentation en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by