mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
add quick external data select test
This commit is contained in:
8
test/external/external_test_mnist_data_select.py
vendored
Normal file
8
test/external/external_test_mnist_data_select.py
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
from tinygrad import Tensor
|
||||||
|
from extra.datasets import fetch_mnist
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
X_train, Y_train, X_test, Y_test = fetch_mnist(tensors=True)
|
||||||
|
samples = Tensor.randint(512, high=X_train.shape[0])
|
||||||
|
select = X_train[samples].realize()
|
||||||
Reference in New Issue
Block a user