Skip to content

Commit 3898207

Browse files
author
masoud@anyscale.com
committed
add mnist example files for CI tests
1 parent cb41b48 commit 3898207

File tree

6 files changed

+19
-1
lines changed

6 files changed

+19
-1
lines changed

zkml/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ proof
2525

2626
params_kzg
2727
params_ipa
28-
examples
28+
# Keep examples/mnist for CI tests
29+
examples/*
30+
!examples/mnist
2931
testing/data
3032
*.diff
3133

zkml/examples/mnist/config.msgpack

1.83 KB
Binary file not shown.

zkml/examples/mnist/data_to_npy.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import tensorflow as tf
2+
import numpy as np
3+
import msgpack
4+
from tensorflow import keras
5+
6+
mnist = tf.keras.datasets.mnist
7+
(images_train, labels_train), (images_test, labels_test) = mnist.load_data()
8+
9+
x = images_test[0]
10+
y = labels_test[0]
11+
print(y)
12+
x = x.flatten() / 255.
13+
x = x.astype(np.float32)
14+
15+
print(x.dtype, x.shape)
16+
np.save('5.npy', x)

zkml/examples/mnist/inp.msgpack

1.02 KB
Binary file not shown.

zkml/examples/mnist/model.msgpack

12.8 KB
Binary file not shown.

zkml/examples/mnist/model.tflite

33.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)