Skip to content
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

Can AlexNet be applied to the CIFAR-10 dataset by using the code you published? Thank you! #3

Open
realcly opened this issue Jun 18, 2022 · 1 comment

Comments

@realcly
Copy link

realcly commented Jun 18, 2022

I have learned a lot after reading your paper and code. Thank you for sharing. I noticed that there was AlexNet network in the net.py file, but after I changed the code a little bit to use AlexNet, I had some problems, such as the test accuracy was not as good as CNN or even very low, etc. Can AlexNet be applied to the CIFAR-10 dataset by using the code you published? Thank you!

@yjlee22
Copy link
Owner

yjlee22 commented Jul 1, 2022

Unfortunately, this is not my paper. I just implemented with pytorch to reproduce the result of the paper. I recommend that you do the following:
Before:
from src.nets import MLP, CNN_v1, CNN_v2
net_glob = CNN_v2(args=args).to(args.device)
After
import torch
from torchvision.models import alexnet
net_glob = alexnet(num_classes=args.num_classes).to(args.device)
if args.dataset == "mnist":
net_glob.Conv2d = torch.nn.Conv2d(1, 64, kernel_size=11, stride=4, padding=2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants