As per the assignment instructions, these models can be evaluated using the following code:
1from huggingface_hub import snapshot_download
2import torch as tr
3
4# 1. Download the repository from Hugging Face
5repo = snapshot_download("ai417upm/A4_4311615_Mohammad", token="YOUR_HUGGINGFACE_TOKEN")
6
7# 2. Load DummyNet
8dummy_model = tr.hub.load(repo, 'DummyNet', source='local')
9dummy_model.eval()
10predictions_dummy = dummy_model(tr.randn(10000, 784))
11
12# 3. Load VanillaNet
13vanilla_model = tr.hub.load(repo, 'VanillaNet', source='local')
14vanilla_model.eval()
15predictions_vanilla = vanilla_model(tr.randn(10000, 784))