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
Code for Alter-ResNet-50 #1
Comments
Hi, Darren. Thank you for your question. The AlterNet code is available at from functools import partial
import torch
import models
import models.alternet as alternet
import models.preresnet_dnn_block as preresnet_dnn
from models.alternet import AttentionBlockB, StemB
model = alternet.AlterNet(
preresnet_dnn.Bottleneck, AttentionBlockB, stem=partial(StemB, pool=False),
num_blocks=[3, 4, 6, 4], num_blocks2=[0, 1, 1, 2],
num_classes=100, window_size=4, heads=[3, 6, 12, 24], sd=0.1,
name="alternet_50",
)
models.stats(model) Again, thank you for your interests in our paper. If you require any further information, feel free to contact me! |
Hi, File "./how-do-vits-work/models/alternet.py", line 39, in forward IndexError: tensors used as indices must be long, byte or bool tensors is it normal ? Thanks a lot, |
Hi, I tested the code again on Or, this Colab notebook may be helpful. Thank you for your support! |
Closing this issue based on the comment above. Please feel free to reopen this issue if the problem still exists. |
@xxxnell @luluenen how-do-vits-work/models/alternet.py Line 49 in cea0635
to i = torch.tensor(np.array([[x, y] for x in range(window_size) for y in range(window_size)]), dtype=torch.long) |
Hi, awesome work and really good points about MSAs! I'm very much interested in the AlterNet mentioned in the paper(based on ResNet-50 and SwinTBlock), but I cant find the implementation of it in this repo. Did I miss? If not, can you release the code maybe?
Thanks a lot!
The text was updated successfully, but these errors were encountered: