Home
last modified time | relevance | path

Searched refs:tensors (Results 1 – 11 of 11) sorted by relevance

/cmsis-nn-latest/Tests/UnitTest/RefactoredTestGen/Lib/
Dop_lstm.py79 tensors = {}
110 tensors[name + "_weights"] = interpreter.get_tensor(detail["index"]).flatten()
124 tensors["output_gate_bias"] = interpreter.get_tensor(1 + time_major_offset).flatten()
125 tensors["cell_gate_bias"] = interpreter.get_tensor(2 + time_major_offset).flatten()
126 tensors["forget_gate_bias"] = interpreter.get_tensor(3 + time_major_offset).flatten()
127 tensors["input_gate_bias"] = interpreter.get_tensor(4 + time_major_offset).flatten()
134 return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales)
137 tensors = {}
173tensors["input_gate_hidden_weights"] = np.random.randint(minval, maxval, size=shapes["hidden_weigh…
174tensors["forget_gate_hidden_weights"] = np.random.randint(minval, maxval, size=shapes["hidden_weig…
[all …]
Dop_batch_matmul.py51 tensors = {}
75 tensors["lhs_input_tensor"] = interpreter.get_tensor(lhs['index'])
76 tensors["rhs_input_tensor"] = interpreter.get_tensor(rhs['index'])
77tensors["lhs_transposed_tensor"] = tf.transpose(tensors["lhs_input_tensor"], [0,1,3,2]).numpy()
78tensors["rhs_transposed_tensor"] = tf.transpose(tensors["rhs_input_tensor"], [0,1,3,2]).numpy()
110 … return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
Dop_fully_connected.py99 tensors = {}
127 tensors["input_weights"] = weights
130 tensors["input_bias"] = np.random.randint(
135 tensors["input_bias"] = None
140 … return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
143 tensors = {}
178 tensors["weights"] = interpreter.get_tensor(filter_layer['index'])
180 tensors["bias"] = interpreter.get_tensor(bias_layer['index'])
182 tensors["bias"] = None
195 tensors["output_multiplier"] = np.array(per_channel_multiplier)
[all …]
Dop_conv.py26 tensors = {}
83 tensors["weights"] = interpreter.get_tensor(filter_layer['index'])
85 tensors["bias"] = interpreter.get_tensor(bias_layer['index'])
87 tensors["bias"] = None
132 tensors["output_multiplier"] = np.array(per_channel_multiplier)
133 tensors["output_shift"] = np.array(per_channel_shift)
135 return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
225 generated_data.tensors |= data.tensors
234 tensors = {}
286 tensors["input_bias"] = quant_bias
[all …]
Dtest.py104 …convert_json_to_tflite(json_template_fpath, json_output_fpath, data.tensors, replacements, args.sc…
129 if shape_name in data.tensors:
130 input_tensors[shape_name] = data.tensors[shape_name]
133 data.tensors[shape_name] = input_tensors[shape_name].numpy()
139 data.tensors["output"] = invoke_tflite(fpaths["tflite"], input_tensors)
141 data.tensors["output"] = invoke_tflite_runtime(fpaths["tflite"], input_tensors)
144 …data.tensors["output"] = invoke_tflite_micro(fpaths["tflite"], input_tensors, params["arena_size"])
146 data.tensors["output"] = invoke_tflite_micro(fpaths["tflite"], input_tensors)
151 data.tensors["output"] = np.maximum(data.tensors["output"], params["activation_min"])
153 data.tensors["output"] = np.minimum(data.tensors["output"], params["activation_max"])
[all …]
Dop_pad.py50 tensors = {}
68 return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales)
Dop_transpose.py47 tensors = {}
76 … return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
Dop_utils.py26 def __init__(self, params, tensors, scales, effective_scales, aliases={}): argument
28 self.tensors = tensors # All tensors
Dop_pooling.py57 tensors = {}
80 return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales)
Dop_maximum_minimum.py57 tensors = {}
109 … return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
/cmsis-nn-latest/Tests/UnitTest/
Dmodel_extractor.py175 tensors = data['subgraphs'][0]['tensors']
227 bias = tensors[bias_index]
228 weights = tensors[weights_index]