Giter VIP home page Giter VIP logo

Comments (2)

helblazer811 avatar helblazer811 commented on May 14, 2024

Vision Transformer

I think it would be interesting to visualize how the vision transformer works by splitting an image into a bunch of patches.

from manimml.

helblazer811 avatar helblazer811 commented on May 14, 2024

Self-Attention

This is the most important component (imo) to visualize property in the Transformer Architecture. I can think of two levels of visualization for this.

In-depth visualization

This visualization will show (1) the Key, Value, and Query feed-forward layers, (2) the matrices returned by these layers that are then multiplied, (3) the softmax operation combining the Key and Query into a score (4) the linear combination of the values into final values.

A high-level conceptual visualization

This is the layer that I think should be a NeuralNetworkLayer.

It should take in either text (broken down into tokens), an image (broken into patches), or vectors (output of a feed forward layer). These should then be passed into a self-attention layer. This layer should put the tokens (whatever type) onto the left and top side of a matrix visualization. The matrix visualization should be a 2D heatmap of the softmaxed (normalized) attention scores. Finally, the scores should be combined with the values to form the output of the self-attention module.

ImageToPatches

I will need to make a layer for splitting up an image into patches. The patches are necessary to represent the image as a sequence.

from manimml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.