Update README.md
Browse files
README.md
CHANGED
@@ -101,22 +101,29 @@ inp = jnp.array(inp)
|
|
101 |
</details>
|
102 |
|
103 |
|
104 |
-
##
|
105 |
|
106 |
-
The pre-trained models can be
|
107 |
|
108 |
```python
|
109 |
-
|
110 |
-
|
111 |
from aim.torch.models import AIMForImageClassification
|
112 |
-
from aim.torch.data import val_transforms
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
|
|
117 |
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
```
|
121 |
|
122 |
### Pre-trained backbones
|
|
|
101 |
</details>
|
102 |
|
103 |
|
104 |
+
## Pre-trained checkpoints
|
105 |
|
106 |
+
The pre-trained models can be accessed either via [Hugging Face](https://huggingface.co/collections/apple/aim-65aa3ce948c718a574f09eb7):
|
107 |
|
108 |
```python
|
109 |
+
# after running pip install git+https://git@github.com/apple/ml-aim.git
|
|
|
110 |
from aim.torch.models import AIMForImageClassification
|
|
|
111 |
|
112 |
+
aim_600m = AIMForImageClassification.from_pretrained("apple/aim-600M")
|
113 |
+
aim_1b = AIMForImageClassification.from_pretrained("apple/aim-1B")
|
114 |
+
aim_3b = AIMForImageClassification.from_pretrained("apple/aim-3B")
|
115 |
+
aim_7b = AIMForImageClassification.from_pretrained("apple/aim-7B")
|
116 |
+
```
|
117 |
|
118 |
+
or [PyTorch Hub](https://pytorch.org/hub/) as:
|
119 |
+
|
120 |
+
```python
|
121 |
+
import torch
|
122 |
+
|
123 |
+
aim_600m = torch.hub.load("apple/ml-aim", "aim_600M")
|
124 |
+
aim_1b = torch.hub.load("apple/ml-aim", "aim_1B")
|
125 |
+
aim_3b = torch.hub.load("apple/ml-aim", "aim_3B")
|
126 |
+
aim_7b = torch.hub.load("apple/ml-aim", "aim_7B")
|
127 |
```
|
128 |
|
129 |
### Pre-trained backbones
|