isaaccorley commited on
Commit
ce5c466
·
verified ·
1 Parent(s): 47896fd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -37,6 +37,18 @@ embedding = session.run(None, {"latlon": coordinates})[0] # shape [2, 3072]
37
  deploy_embedding = embedding[:, :64]
38
  ```
39
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  The ONNX graph expects `latlon` with shape `[N, 2]` in `(lat, lon)` order and returns the full 3,072-dimensional trunk.
41
  Use the leading 64 columns as the deployment embedding. The safetensors and PyTorch files are also available for users
42
  who have a compatible loader.
 
37
  deploy_embedding = embedding[:, :64]
38
  ```
39
 
40
+ Or use `torch.hub`
41
+
42
+ ```python
43
+ import torch
44
+
45
+ model = torch.hub.load("taylor-geospatial/mind", "mind", trust_repo=True)
46
+ coords = torch.tensor([[37.77, -122.42], [51.51, -0.13]]) # latitude, longitude
47
+ with torch.inference_mode():
48
+ full = model(coords, return_features=True) # [2, 3072]
49
+ features = full[:, :64] # [2, 64]
50
+ ```
51
+
52
  The ONNX graph expects `latlon` with shape `[N, 2]` in `(lat, lon)` order and returns the full 3,072-dimensional trunk.
53
  Use the leading 64 columns as the deployment embedding. The safetensors and PyTorch files are also available for users
54
  who have a compatible loader.