Download matlab/example.py from linhmv/VisualMOT: direct link, hf CLI and curl.
- Browser
- Download file 330 Bytes
-
https://huggingface.co/datasets/linhmv/VisualMOT/resolve/main/matlab/example.py
- Command line
-
hf download hf://datasets/linhmv/VisualMOT/matlab/example.py
-
curl -L -o example.py https://huggingface.co/datasets/linhmv/VisualMOT/resolve/main/matlab/example.py
330 Bytes
| import numpy as np | |
| def descent(X, y, learning_rate=0.001, iters=100): | |
| w = np.zeros((X.shape[1], 1)) | |
| for i in range(iters): | |
| grad_vec = -(X.T).dot(y - X.dot(w)) | |
| w = w - learning_rate * grad_vec | |
| return w | |
| X = np.loadtxt("MOT16-13_f250.txt") | |
| print(X) | |
| # grad_vec = -(X.T).dot(y - X.dot(w)) | |