Searched refs:tensors (Results 1 – 11 of 11) sorted by relevance
/cmsis-nn-latest/Tests/UnitTest/RefactoredTestGen/Lib/ |
D | op_lstm.py | 79 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 = {} 173 …tensors["input_gate_hidden_weights"] = np.random.randint(minval, maxval, size=shapes["hidden_weigh… 174 …tensors["forget_gate_hidden_weights"] = np.random.randint(minval, maxval, size=shapes["hidden_weig… [all …]
|
D | op_batch_matmul.py | 51 tensors = {} 75 tensors["lhs_input_tensor"] = interpreter.get_tensor(lhs['index']) 76 tensors["rhs_input_tensor"] = interpreter.get_tensor(rhs['index']) 77 … tensors["lhs_transposed_tensor"] = tf.transpose(tensors["lhs_input_tensor"], [0,1,3,2]).numpy() 78 … tensors["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)
|
D | op_fully_connected.py | 99 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 …]
|
D | op_conv.py | 26 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 …]
|
D | test.py | 104 …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 …]
|
D | op_pad.py | 50 tensors = {} 68 return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales)
|
D | op_transpose.py | 47 tensors = {} 76 … return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
|
D | op_utils.py | 26 def __init__(self, params, tensors, scales, effective_scales, aliases={}): argument 28 self.tensors = tensors # All tensors
|
D | op_pooling.py | 57 tensors = {} 80 return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales)
|
D | op_maximum_minimum.py | 57 tensors = {} 109 … return Lib.op_utils.Generated_data(generated_params, tensors, scales, effective_scales, aliases)
|
/cmsis-nn-latest/Tests/UnitTest/ |
D | model_extractor.py | 175 tensors = data['subgraphs'][0]['tensors'] 227 bias = tensors[bias_index] 228 weights = tensors[weights_index]
|