-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more options to ViT
#184
Draft
theabhirath
wants to merge
53
commits into
FluxML:master
Choose a base branch
from
theabhirath:vit-plus
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Some docs 2. Basic tests for ResNet and ResNeXt now pass
1. Less keywords for the user to worry about 2. Delete `ResNeXt` just for now
`downsample_args` is actually redundant
Also add tests. A lot of tests
Also 1. Tweaks - II : Formatting + some docs 2. Groundwork for abstracting out the classifier
1. Reorganise layer imports for easy access 2. Get pooling to work
So much GC, might as well have a function for it
Co-authored-by: Brian Chen <ToucheSir@users.noreply.github.com>
Neither does formatting, unfortunately. Also refactor `classifier` to separate out FC-layer creation and pooling
It really does never stop Co-Authored-By: Kyle Daruwalla <daruwalla.k.public@icloud.com>
And make `downsample_opts` a smidge easier to work with. Also, a wee bit o' formatting and cleanup.
1. Some docs 2. Basic tests for ResNet and ResNeXt now pass
1. Less keywords for the user to worry about 2. Delete `ResNeXt` just for now
`downsample_args` is actually redundant
Also add tests. A lot of tests
Also 1. Tweaks - II : Formatting + some docs 2. Groundwork for abstracting out the classifier
1. Reorganise layer imports for easy access 2. Get pooling to work
So much GC, might as well have a function for it
Co-authored-by: Brian Chen <ToucheSir@users.noreply.github.com>
Neither does formatting, unfortunately. Also refactor `classifier` to separate out FC-layer creation and pooling
It really does never stop Co-Authored-By: Kyle Daruwalla <daruwalla.k.public@icloud.com>
And make `downsample_opts` a smidge easier to work with. Also, a wee bit o' formatting and cleanup.
Closures is the name of the game
Simplify `conv_bn` to `conv_norm` and use it
And some more formatting
Also 1. Make class tokens optional 2. Allow class tokens to be before positional embedding as in DeIT-III
what's status now ? |
I've had less time to work on this in the recent past, but I'm going to try and push some of these refactors through in the next few months. However, there's some work that's also happening on the Attention implementations around the Flux ecosystem - I suspect any reforms to the ViT will wait on that work to land |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This modifies the current ViT API to add more options - notably, there is now a optional
prenorm/postnorm
toggle. There's also an option to make class tokens disappear completely, and also to allow class tokens to be before the positional embedding as in DeIT-III. This makes some other cleanup changes as well. The API is more congested for now but I thought I'd get this in before I start working on the other ViTs - maybe there's some potential for extracting common stuff out there.Needs #174 to land before this makes sense. Also documentation is pending