Git Product home page Git Product logo

Comments (3)

tahmid0007 avatar tahmid0007 commented on July 23, 2024

Hi Debangan,

I appreciate your interest in the work. While I understand your request for further clarity, one should know that the transformer networks have a number of bells and whistles. This repo has a number of comments inside the code but presumes the reader has already gone through the paper. Understanding the paper is highly recommended. nevertheless, I will try in future to incorporate documentation.

from visualtransformers.

DebanganThakuria avatar DebanganThakuria commented on July 23, 2024

Thanks for the reply, Tahmid.

I am trying to use your work (I have read the Original Paper) in my project. But, I am getting many errors. Here I should admit that I am very new to PyTorch and don't get the nitty-gritty of this difficult-to-understand framework.
So, my images are of dim 50 x 50 x 3 and have 2 classes(pos and neg). Which parameters should I modify to use the VitResNet in my work? A little help from you, the author of this code, will be highly appreciated.

from visualtransformers.

tahmid0007 avatar tahmid0007 commented on July 23, 2024

def init(self, block, num_blocks, num_classes=10, dim = 128, num_tokens = 8, mlp_dim = 256, heads = 8, depth = 6, emb_dropout = 0.1, dropout= 0.1):
For your case, num_classes is 2 (pos,neg). Just so you have better clarity, the first segment of the code is a vanilla resnet and a transformer takes over from an intermediate layer (16x16).
Share screenshots of your errors in the future.
Thanks

from visualtransformers.

Related Issues (12)

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.