|
7 | 7 | "source": [
|
8 | 8 | "# Usage\n",
|
9 | 9 | "\n",
|
10 |
| - "This notebook shows how to use the `osculari` package.\n", |
| 10 | + "This notebook demonstrates how to use the `osculari` package.\n", |
11 | 11 | "\n",
|
12 |
| - "The `osculari` package consists of three main `modules`:\n", |
13 |
| - "* `models`: to readout pretrained networks and add linear layers on top of them.\n", |
14 |
| - "* `datasets`: to create datasets and dataloaders to train and test linear probes.\n", |
15 |
| - "* `paradigms`: to implement psychophysical paradigms to experiment with deep networks." |
| 12 | + "The `osculari` package is organized into three main `modules`:\n", |
| 13 | + "* `models`: Used for reading pretrained networks and adding linear layers on top of them.\n", |
| 14 | + "* `datasets`: Used to create datasets and dataloaders for training and testing linear probes.\n", |
| 15 | + "* `paradigms`: Used to implement psychophysical paradigms for experimenting with deep networks." |
16 | 16 | ]
|
17 | 17 | },
|
18 | 18 | {
|
|
77 | 77 | },
|
78 | 78 | {
|
79 | 79 | "cell_type": "code",
|
80 |
| - "execution_count": 73, |
| 80 | + "execution_count": 2, |
81 | 81 | "id": "e74f3e20-bb57-4511-baf7-d18da5cb38ed",
|
82 | 82 | "metadata": {},
|
83 | 83 | "outputs": [
|
|
168 | 168 | " 'deeplabv3_resnet101',\n",
|
169 | 169 | " 'deeplabv3_resnet50',\n",
|
170 | 170 | " 'fcn_resnet101',\n",
|
171 |
| - " 'fcn_resnet50',\n", |
172 |
| - " 'lraspp_mobilenet_v3_large'],\n", |
| 171 | + " 'fcn_resnet50'],\n", |
173 | 172 | " 'taskonomy': ['taskonomy_autoencoding',\n",
|
174 | 173 | " 'taskonomy_class_object',\n",
|
175 | 174 | " 'taskonomy_class_scene',\n",
|
|
206 | 205 | " 'clip_ViT-L/14@336px']}"
|
207 | 206 | ]
|
208 | 207 | },
|
209 |
| - "execution_count": 73, |
| 208 | + "execution_count": 2, |
210 | 209 | "metadata": {},
|
211 | 210 | "output_type": "execute_result"
|
212 | 211 | }
|
|
242 | 241 | " - Downloadable URL of the pretrained weights.\n",
|
243 | 242 | " - A string corresponding to the available weight, for instance, [PyTorch resnet50](https://pytorch.org/vision/stable/models/generated/torchvision.models.resnet50.html) supports one\n",
|
244 | 243 | "of the following strings: \\[\"*DEFAULT*\", \"*IMAGENET1K_V1*\", \"*IMAGENET1K_V2*\"\\].\n",
|
245 |
| - " - The same name as `architecture` which loads the network's default weights.\n", |
| 244 | + " - The same name as `architecture`, which loads the network's default weights.\n", |
246 | 245 | "* `layers` determines the read-out (cut-off) layer(s). Which layers are available for each network\n",
|
247 | 246 | "can be obtained by calling the `models.available_layers()` function.\n",
|
248 | 247 | "\n",
|
|
272 | 271 | }
|
273 | 272 | ],
|
274 | 273 | "source": [
|
275 |
| - "architecture = 'resnet50' # networks' architecture\n", |
| 274 | + "architecture = 'resnet50' # network's architecture\n", |
276 | 275 | "weights = 'resnet50' # the pretrained weights\n",
|
277 | 276 | "layer = 'block0' # the readout layer\n",
|
278 | 277 | "readout_kwargs = { # parameters for extracting features from the pretrained network\n",
|
|
431 | 430 | }
|
432 | 431 | ],
|
433 | 432 | "source": [
|
434 |
| - "architecture = 'resnet50' # networks' architecture\n", |
| 433 | + "architecture = 'resnet50' # network's architecture\n", |
435 | 434 | "weights = 'resnet50' # the pretrained weights\n",
|
436 | 435 | "img_size = 224 # network's input size\n",
|
437 | 436 | "layer = 'block0' # the readout layer\n",
|
|
540 | 539 | }
|
541 | 540 | ],
|
542 | 541 | "source": [
|
543 |
| - "architecture = 'resnet50' # networks' architecture\n", |
| 542 | + "architecture = 'resnet50' # network's architecture\n", |
544 | 543 | "weights = 'resnet50' # the pretrained weights\n",
|
545 | 544 | "img_size = 224 # network's input size\n",
|
546 | 545 | "layer = 'block0' # the readout layer\n",
|
|
629 | 628 | }
|
630 | 629 | ],
|
631 | 630 | "source": [
|
632 |
| - "architecture = 'resnet50' # networks' architecture\n", |
| 631 | + "architecture = 'resnet50' # network's architecture\n", |
633 | 632 | "weights = 'resnet50' # the pretrained weights\n",
|
634 | 633 | "img_size = 224 # network's input size\n",
|
635 | 634 | "layer = 'block0' # the readout layer\n",
|
|
0 commit comments