Rammadaeus commited on
Commit
7310b92
·
verified ·
1 Parent(s): 804270b

Upload fuzz/runner.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. fuzz/runner.py +12 -0
fuzz/runner.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import tensorflow as tf
2
+ import numpy as np
3
+ import sys
4
+ try:
5
+ interp = tf.lite.Interpreter(model_path=sys.argv[1])
6
+ interp.allocate_tensors()
7
+ for d in interp.get_input_details():
8
+ interp.set_tensor(d[index], np.zeros(d[shape], dtype=d[dtype]))
9
+ interp.invoke()
10
+ print(EXECUTED)
11
+ except Exception as e:
12
+ print(type(e).__name__)