Created
October 27, 2018 01:29
-
-
Save juneoh/99267b043359d71504476973a1268a79 to your computer and use it in GitHub Desktop.
PyTorch AlexNet for grayscale images
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
import torch.nn as nn | |
from torchvision.models import alexnet | |
model = alexnet(pretrained=True, num_classes=10) | |
model.features[0] = nn.Conv2d(1, 64, kernel_size=(11, 11), stride=(4, 4), padding=(2, 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment