logoalt Hacker News

codemogyesterday at 8:14 PM1 replyview on HN

Curious why the model architecture wasn’t talked about at all? Did I miss that part?


Replies

g58892881yesterday at 8:54 PM

pretty basic

``` from torchvision import models

# Avoid downloading pretrained weights; we load trained checkpoint weights. model = models.resnet18(weights=None) model.fc = nn.Linear(model.fc.in_features, num_classes) ```

https://github.com/mixfont/lens/blob/main/lens_inference.py#...