ONE - On-device Neural Engine
Loading...
Searching...
No Matches
gen_h5_random_inputs_all Namespace Reference

Variables

 parser = argparse.ArgumentParser()
 
 type
 
 int
 
 required
 
 str
 
 True
 
 nargs
 
 args = parser.parse_args()
 
 num_data = args.num_data
 
 output_dir = args.output_dir
 
 artifact_dir = args.artifact_dir
 
 model_list = args.model
 
 model_path = os.path.join(artifact_dir, model_name + '.tflite')
 
 h5_path = os.path.join(output_dir, model_name + '.tflite.input.h5')
 
 interpreter = tf.lite.Interpreter(model_path)
 
 input_details = interpreter.get_input_details()
 
 h5_file = h5.File(h5_path, 'w')
 
 group = h5_file.create_group("value")
 
 sample = group.create_group(str(i))
 
 input_detail = input_details[j]
 
 input_data
 
 data
 

Variable Documentation

◆ args

gen_h5_random_inputs_all.args = parser.parse_args()

Definition at line 16 of file gen_h5_random_inputs_all.py.

◆ artifact_dir

gen_h5_random_inputs_all.artifact_dir = args.artifact_dir

Definition at line 20 of file gen_h5_random_inputs_all.py.

◆ data

gen_h5_random_inputs_all.data

Definition at line 53 of file gen_h5_random_inputs_all.py.

◆ group

gen_h5_random_inputs_all.group = h5_file.create_group("value")

Definition at line 32 of file gen_h5_random_inputs_all.py.

◆ h5_file

gen_h5_random_inputs_all.h5_file = h5.File(h5_path, 'w')

Definition at line 31 of file gen_h5_random_inputs_all.py.

◆ h5_path

gen_h5_random_inputs_all.h5_path = os.path.join(output_dir, model_name + '.tflite.input.h5')

Definition at line 25 of file gen_h5_random_inputs_all.py.

◆ input_data

gen_h5_random_inputs_all.input_data
Initial value:
1= np.array(
2 np.random.random_integers(0, 1, input_detail["shape"]),
3 input_detail["dtype"])

Definition at line 45 of file gen_h5_random_inputs_all.py.

◆ input_detail

gen_h5_random_inputs_all.input_detail = input_details[j]

Definition at line 41 of file gen_h5_random_inputs_all.py.

◆ input_details

gen_h5_random_inputs_all.input_details = interpreter.get_input_details()

Definition at line 28 of file gen_h5_random_inputs_all.py.

◆ int

gen_h5_random_inputs_all.int

Definition at line 12 of file gen_h5_random_inputs_all.py.

◆ interpreter

gen_h5_random_inputs_all.interpreter = tf.lite.Interpreter(model_path)

Definition at line 27 of file gen_h5_random_inputs_all.py.

◆ model_list

gen_h5_random_inputs_all.model_list = args.model

Definition at line 21 of file gen_h5_random_inputs_all.py.

◆ model_path

gen_h5_random_inputs_all.model_path = os.path.join(artifact_dir, model_name + '.tflite')

Definition at line 24 of file gen_h5_random_inputs_all.py.

◆ nargs

gen_h5_random_inputs_all.nargs

Definition at line 15 of file gen_h5_random_inputs_all.py.

◆ num_data

gen_h5_random_inputs_all.num_data = args.num_data

Definition at line 18 of file gen_h5_random_inputs_all.py.

◆ output_dir

gen_h5_random_inputs_all.output_dir = args.output_dir

Definition at line 19 of file gen_h5_random_inputs_all.py.

◆ parser

gen_h5_random_inputs_all.parser = argparse.ArgumentParser()

Definition at line 11 of file gen_h5_random_inputs_all.py.

◆ required

gen_h5_random_inputs_all.required

Definition at line 12 of file gen_h5_random_inputs_all.py.

◆ sample

gen_h5_random_inputs_all.sample = group.create_group(str(i))

Definition at line 37 of file gen_h5_random_inputs_all.py.

◆ str

gen_h5_random_inputs_all.str

Definition at line 13 of file gen_h5_random_inputs_all.py.

◆ True

gen_h5_random_inputs_all.True

Definition at line 15 of file gen_h5_random_inputs_all.py.

◆ type

gen_h5_random_inputs_all.type

Definition at line 12 of file gen_h5_random_inputs_all.py.