Home
last modified time | relevance | path

Searched refs:f (Results 1 – 16 of 16) sorted by relevance

/cmsis-nn-latest/Tests/UnitTest/RefactoredTestGen/Lib/
Dtest.py65 fpaths["tflite"] = fpaths["data_folder"] / f"{params['name']}.tflite"
82 json_template_fpath = fpaths["json_template_folder"] / f"{params['json_template']}"
83 json_output_fpath = fpaths["data_folder"] / f"{params['name']}.json"
88 raise ValueError(f"Invalid tflite generator in {params['name']}")
113 raise ValueError(f"Invalid interpreter in {params['name']}")
131 fpaths[name] = fpaths["data_folder"] / f"{name}.h"
148 raise ValueError(f"Unknown op type '{op_type_string}'")
183 with output_fpath.open("wb") as f:
184 f.write(tflite_model)
222 with config_fpath.open("w+") as f:
[all …]
Dtest_plan.py31 print(f"{suite['suite_name']}")
33 print(f"- {test['name']}")
41 print(f"\nGenerating tests from {args.test_plan}")
46 print(f"{test_suite_params['suite_name']}")
Dop_utils.py80 raise Exception(f"Unable to deduce dtype from name '{name}'")
89 raise Exception(f"Unrecognized dtype '{dtype}'")
102 raise Exception(f"Unrecognized dtype '{dtype}'")
115 raise Exception(f"Unrecognized dtype '{dtype}'")
130 raise Exception(f"Unrecognized dtype '{dtype}'")
145 raise Exception(f"Unrecognized dtype '{dtype}'")
Dtest_suite.py39 print(f"- {test_params['name']}")
/cmsis-nn-latest/Tests/UnitTest/
Dmodel_extractor.py72 command = f"flatc -o {dirname} --strict-json -t {schema} -- {tflite_input}"
77 print(f"ERROR: {command = }")
80 raise RuntimeError(f"{e} from: {command = }. Did you install flatc?")
85 filename = f"{name_prefix}_config_data.h"
90 prefix = f'{op_name}_{op_index}'
93 with open(filepath, "w+") as f:
94 self.write_c_common_header(f)
95 f.write("#define {}_OUT_CH {}\n".format(prefix, self.output_ch))
96 f.write("#define {}_IN_CH {}\n".format(prefix, self.input_ch))
97 f.write("#define {}_INPUT_W {}\n".format(prefix, self.x_input))
[all …]
Dadd_mul_settings.py146 with open(filepath, "a") as f:
147 f.write("#define {}_DST_SIZE {}\n".format(prefix,
149 f.write("#define {}_OUT_ACTIVATION_MIN {}\n".format(prefix, self.out_activation_min))
150 f.write("#define {}_OUT_ACTIVATION_MAX {}\n".format(prefix, self.out_activation_max))
151 f.write("#define {}_INPUT1_OFFSET {}\n".format(prefix, self.input1_zero_point))
152 f.write("#define {}_INPUT2_OFFSET {}\n".format(prefix, self.input2_zero_point))
153 f.write("#define {}_OUTPUT_MULT {}\n".format(prefix, self.output_mult))
154 f.write("#define {}_OUTPUT_SHIFT {}\n".format(prefix, self.output_shift))
155 f.write("#define {}_OUTPUT_OFFSET {}\n".format(prefix, self.output_zero_point))
157 f.write("#define {}_LEFT_SHIFT {}\n".format(prefix, self.left_shift))
[all …]
Dtest_settings.py127 raise RuntimeError(f"Invalid interpreter {interpreter}")
215 with open(file) as f:
216 shape = list(map(int, next(f)[1:].split(',')))
217 data = np.genfromtxt(f, delimiter=',').reshape(shape)
304 print(f"ERROR: {command_list = }")
307 raise RuntimeError(f"{e} from: {command_list = }")
314 with open(filepath, 'w+') as f:
315 f.write(self.tensorflow_reference_version)
317 f.write('#include "{}"\n'.format(self.generated_header_files.pop()))
320 def write_common_config(self, f, prefix): argument
[all …]
Dlstm_settings.py370 with open(filepath, "a") as f:
371 f.write("#define {}_BUFFER_SIZE {}\n".format(prefix, self.batches * self.number_units))
372 f.write("#define {}_INPUT_BATCHES {}\n".format(prefix, self.batches))
373f.write("#define {}_DST_SIZE {}\n".format(prefix, self.batches * self.time_steps * self.number_uni…
374 f.write("#define {}_TIME_STEPS {}\n".format(prefix, self.time_steps))
375 f.write("#define {}_NUMBER_UNITS {}\n".format(prefix, self.number_units))
376 f.write("#define {}_NUMBER_INPUTS {}\n".format(prefix, self.number_inputs))
377 f.write("#define {}_TIME_MAJOR {}\n".format(prefix, int(self.time_major)))
378 f.write("#define {}_IN_ACTIVATION_MIN {}\n".format(prefix, self.in_activation_min))
379 f.write("#define {}_IN_ACTIVATION_MAX {}\n".format(prefix, self.in_activation_max))
[all …]
Dsvdf_settings.py131 with open(filepath, "a") as f:
132 f.write("#define {}_MULTIPLIER_IN {}\n".format(prefix, self.multiplier_in))
133 f.write("#define {}_MULTIPLIER_OUT {}\n".format(prefix, self.multiplier_out))
134 f.write("#define {}_SHIFT_1 {}\n".format(prefix, self.shift_1))
135 f.write("#define {}_SHIFT_2 {}\n".format(prefix, self.shift_2))
136 f.write("#define {}_IN_ACTIVATION_MIN {}\n".format(prefix, self.in_activation_min))
137 f.write("#define {}_IN_ACTIVATION_MAX {}\n".format(prefix, self.in_activation_max))
138 f.write("#define {}_RANK {}\n".format(prefix, self.rank))
139 f.write("#define {}_FEATURE_BATCHES {}\n".format(prefix, self.number_filters))
140 f.write("#define {}_TIME_BATCHES {}\n".format(prefix, self.memory_size))
[all …]
Dsoftmax_settings.py97 with open(filepath, "a") as f:
98 f.write("#define {}_NUM_ROWS {}\n".format(prefix, self.y_input))
99 f.write("#define {}_ROW_SIZE {}\n".format(prefix, self.x_input))
100 f.write("#define {}_INPUT_MULT {}\n".format(prefix, self.input_multiplier))
101 f.write("#define {}_INPUT_LEFT_SHIFT {}\n".format(prefix, self.input_left_shift))
103 f.write("#define {}_DIFF_MIN {}\n".format(prefix, -self.diff_min))
104 f.write("#define {}_DST_SIZE {}\n".format(prefix, self.x_output * self.y_output))
Dfully_connected_settings.py122 with open(filepath, "a") as f:
123 f.write("#define {}_OUTPUT_MULTIPLIER {}\n".format(prefix, self.quantized_multiplier))
124 f.write("#define {}_OUTPUT_SHIFT {}\n".format(prefix, self.quantized_shift))
125f.write("#define {}_ACCUMULATION_DEPTH {}\n".format(prefix, self.input_ch * self.x_input * self.y_…
126 f.write("#define {}_INPUT_OFFSET {}\n".format(prefix, -self.input_zero_point))
127 f.write("#define {}_FILTER_OFFSET {}\n".format(prefix, -self.filter_zero_point))
128 f.write("#define {}_OUTPUT_OFFSET {}\n".format(prefix, self.output_zero_point))
266 raise RuntimeError(f"Dimension mismatch for {self.testdataset}")
270 raise RuntimeError(f"Filter zero point point mismatch for {self.filter_zero_point}")
Dunittest_targets.py114 print(f"{target_name} inherits from {data[target_name]['inherits'][0]}")
149 run_command(f'cp -a {mbed_path}. .')
151 …run_command(f'rm -rf mbed-os/TESTS' + ' mbed-os/UNITTESTS' + ' mbed-os/docker_images' + ' mbed-os/…
398 for f in parsed_functions:
399 if f in func:
403 with open(test_runner, "r") as f:
404 lines = f.readlines()
405 with open(test_runner, "w") as f:
409 f.write(line)
412 f.write(line)
Dconv_settings.py132 with open(filepath, "a") as f:
133 self.write_common_config(f, prefix)
135 f.write("#define {}_CH_MULT {}\n".format(prefix, self.channel_multiplier))
136 f.write("#define {}_INPUT_OFFSET {}\n".format(prefix, -self.input_zero_point))
137 f.write("#define {}_OUTPUT_OFFSET {}\n".format(prefix, self.output_zero_point))
138 f.write("#define {}_DILATION_X {}\n".format(prefix, self.dilation_x))
139 f.write("#define {}_DILATION_Y {}\n".format(prefix, self.dilation_y))
141 f.write("#define {}_FILTER_CH {}\n".format(prefix, self.filter_ch))
143 f.write("#define {}_PAD_X_WITH_OFFSET {}\n".format(prefix, self.pad_x_with_offset))
144 f.write("#define {}_PAD_Y_WITH_OFFSET {}\n".format(prefix, self.pad_y_with_offset))
[all …]
Dpooling_settings.py132 with open(filepath, "a") as f:
133 self.write_common_config(f, prefix)
/cmsis-nn-latest/Tests/UnitTest/Corstone-300/
Dretarget.c56 int fputc(int ch, FILE *f) in fputc() argument
58 (void)(f); in fputc()
62 int fgetc(FILE *f) in fgetc() argument
64 (void)f; in fgetc()
/cmsis-nn-latest/Documentation/Doxygen/
Dnn.dxy.in351 # as Fortran files (default is PHP), and .f files as C (default is Fortran),
352 # use: inc=Fortran f=C.
978 # comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
1020 *.f \