Metalhead.jl icon indicating copy to clipboard operation
Metalhead.jl copied to clipboard

Swin Transformer related utility function

Open XWHtorrentx opened this issue 2 years ago • 6 comments

add a function which returns a matrix of relative position index from Swin Transformer

XWHtorrentx avatar Mar 15 '22 06:03 XWHtorrentx

Thank you for this contribution! Unfortunately, we don't accept PRs for isolated utilities like this. If this function is useful for constructing a larger model, then we would need to review the utility usage in the context of the complete model code (or some draft of it) to effectively evaluate the implementation. I encourage you to try implementing the full model as well!

darsnack avatar Mar 15 '22 14:03 darsnack

@XWHtorrentx it is still not clear what you are trying to accomplish with this PR. As @darsnack said, we don't want to provide utility functions in this repo, but just model constructors. Are you going to implement the Swin Transformer or what?

CarloLucibello avatar Mar 24 '22 07:03 CarloLucibello

I am currently working on Swin Transformer. It is almost done and I am testing it. Since I am new here I don’t know that I should pull a model as a whole.

2022年3月24日 15:50,Carlo Lucibello @.***> 写道:

@XWHtorrentx https://github.com/XWHtorrentx it is still not clear what you are trying to accomplish with this PR. As @darsnack https://github.com/darsnack said, we don't want to provide utility functions in this repo, but just model constructors. Are you going to implement the Swin Transformer or what?

— Reply to this email directly, view it on GitHub https://github.com/FluxML/Metalhead.jl/pull/134#issuecomment-1077333905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXOCCC262AU3DLDFDG32LVLVBQNFJANCNFSM5QXUSZPQ. You are receiving this because you were mentioned.

XWHtorrentx avatar Oct 11 '22 07:10 XWHtorrentx

I would say open a new PR for the whole model. You can target it against this branch instead of master if that would make your life easier too.

ToucheSir avatar Oct 11 '22 14:10 ToucheSir

Also, we'll help guide your PR so that it is ready to merge. You don't need to worry about it being partially incomplete.

darsnack avatar Oct 11 '22 14:10 darsnack

The other thing is the use of NeuralAttentionlib, which last I checked slowed the model down a lot on the CPU. Not sure if there's been any changes there - I will run some benchmarks to check

theabhirath avatar Oct 11 '22 15:10 theabhirath