Home
last modified time | relevance | path

Searched refs:weights (Results 1 – 12 of 12) sorted by relevance

/cmsis-nn-latest/Tests/UnitTest/
Dfully_connected_settings.py137 def generate_data(self, input_data=None, weights=None, biases=None) -> None: argument
166 if weights is not None:
167 weights = tf.reshape(weights, fc_weights_format)
169 weights = self.get_randomized_data(fc_weights_format,
177 … generated_json = self.generate_json_from_template(weights, bias_data=biases, bias_buffer=2)
180 weights_size = weights.numpy().size
190 if weights is not None:
191 weights = tf.reshape(weights, fc_weights_format)
193 weights = self.get_randomized_data(fc_weights_format,
202 … generated_json = self.generate_json_from_template(weights, bias_data=biases, bias_buffer=2)
[all …]
Dconv_settings.py205 def generate_data(self, input_data=None, weights=None, biases=None) -> None: argument
226 if weights is not None:
227 weights = tf.reshape(weights, w_shape)
229 weights = self.get_randomized_data(w_shape,
240 weights = np.append(weights, [0])
300 temp = np.reshape(weights, (len(weights) // 2, 2)).astype(np.uint8)
302 weights = tf.convert_to_tensor(temp)
307 None, weights, int8_time_weights=True, bias_data=biases, bias_buffer=3)
309 generated_json = self.generate_json_from_template(weights, int8_time_weights=False,
323 if weights is not None:
[all …]
Dlstm_settings.py97 … def generate_data(self, input_data=None, weights=None, hidden_weights=None, biases=None) -> None: argument
113 if weights is not None:
114 weights = tf.reshape(weights, [self.number_inputs, number_cells * number_w_b])
116 weights = self.get_randomized_data([self.number_inputs, number_cells * number_w_b],
167 print("Updating weights", model.layers[1 + time_major_offset].weights[0].name)
168 model.layers[1 + time_major_offset].weights[0].assign(weights)
169 print("Updating hidden weights", model.layers[1 + time_major_offset].weights[1].name)
170 model.layers[1 + time_major_offset].weights[1].assign(hidden_weights)
171 print("Updating bias", model.layers[1 + time_major_offset].weights[2].name)
172 model.layers[1 + time_major_offset].weights[2].assign(biases)
[all …]
Dmodel_extractor.py228 weights = tensors[weights_index]
230 weights_data_index = weights['buffer']
240 filter_shape = weights['shape']
273 def generate_data(self, input_data=None, weights=None, biases=None) -> None: argument
Dsvdf_settings.py149 …def generate_data(self, input_data=None, weights=None, biases=None, time_data=None, state_data=Non… argument
168 if weights is not None:
169 weights_feature_data = tf.reshape(weights, [self.number_filters, self.input_size])
Dsoftmax_settings.py116 def generate_data(self, input_data=None, weights=None, biases=None) -> None: argument
Dtest_settings.py426 def generate_data(self, input_data=None, weights=None, biases=None) -> None: argument
DREADME.md163 | fully_connected | x | x | New version only supports int4 packed weights
/cmsis-nn-latest/Tests/UnitTest/RefactoredTestGen/Lib/
Dop_fully_connected.py82 weights = np.random.randint(minval, maxval, size=shapes["weight_shape"])
84 uneven = weights.size % 2
86 weights = np.append(weights, 0)
88 temp = np.reshape(weights, (weights.size // 2, 2)).astype(np.uint8)
89 weights = 0xff & ((0xf0 & (temp[:, 1] << 4)) | (temp[:, 0] & 0xf))
90 tensors["input_weights"] = weights
Dop_conv.py88 weights = Lib.op_utils.generate_tf_tensor(
94 conv_layer.set_weights([weights, bias])
96 conv_layer.set_weights([weights])
Dop_lstm.py68 model.layers[1 + time_major_offset].weights[0].assign(input_weights)
71 model.layers[1 + time_major_offset].weights[1].assign(hidden_weights)
74 model.layers[1 + time_major_offset].weights[2].assign(biases)
/cmsis-nn-latest/
DREADME.md41 * int4 weights + int8 activations