/cmsis-nn-latest/Tests/UnitTest/RefactoredTestGen/Lib/ |
D | op_utils.py | 18 import tensorflow as tf namespace 62 def generate_tf_tensor(dims, minval, maxval, decimals=0, datatype=tf.float32): 65 tensor = tf.convert_to_tensor(array, dtype=datatype) 85 return tf.int8 87 return tf.int16
|
D | test.py | 21 import tensorflow as tf namespace 157 converter = tf.lite.TFLiteConverter.from_keras_model(keras_model) 167 converter.optimizations = [tf.lite.Optimize.DEFAULT] 172 converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] 175 converter._experimental_full_integer_quantization_bias_type = tf.int32 177 tf.lite.OpsSet.EXPERIMENTAL_TFLITE_BUILTINS_ACTIVATIONS_INT16_WEIGHTS_INT8 397 version = tf.__version__ 398 revision = tf.__git_version__
|
D | op_lstm.py | 18 import tensorflow as tf namespace 55 input_layer_transposed = tf.transpose(input_layer, perm=[1, 0, 2])
|
/cmsis-nn-latest/Tests/UnitTest/ |
D | softmax_settings.py | 19 import tensorflow as tf namespace 109 input_data = tf.reshape(input_data, input_shape) 120 inttype = tf.int16 123 inttype = tf.int8 145 interpreter.set_tensor(input_layer["index"], tf.cast(input_data, tf.int8)) 154 … interpreter = self.convert_and_interpret(model, inttype, tf.expand_dims(input_data, axis=0))
|
D | test_settings.py | 28 import tensorflow as tf namespace 111 revision = tf.__git_version__ 112 version = tf.__version__ 134 os.path.basename(__file__), tf.__version__, keras.__version__)) 229 return tf.convert_to_tensor(fw) 247 return tf.convert_to_tensor(np_float_array) 258 …data = tf.Variable(tf.random.uniform(dims, minval=minrange, maxval=maxrange, dtype=tf.dtypes.int64… 259 data = tf.cast(data, dtype=tf.float32) 261 …data = tf.Variable(tf.random.uniform(dims, minval=minrange, maxval=maxrange, dtype=tf.dtypes.float… 263 data = tf.convert_to_tensor(data) [all …]
|
D | pooling_settings.py | 20 import tensorflow as tf namespace 77 inttype = tf.int16 80 inttype = tf.int8 85 input_data = tf.cast(input_data, tf.float32)
|
D | svdf_settings.py | 19 import tensorflow as tf namespace 156 if float(('.'.join(tf.__version__.split('.')[:2]))) > 2.10: 161 input_data = tf.reshape(input_data, [self.input_sequence_length]) 169 weights_feature_data = tf.reshape(weights, [self.number_filters, self.input_size]) 176 weights_time_data = tf.reshape(time_data, [self.number_filters, self.memory_size]) 185 biases = tf.reshape(biases, [self.number_units]) 240 input_sequence = tf.reshape(input_sequence, [self.batches, self.input_size]) 242 interpreter.set_input(tf.cast(input_sequence, tf.int8), input_layer["index"]) 244 interpreter.set_tensor(input_layer["index"], tf.cast(input_sequence, tf.int8))
|
D | fully_connected_settings.py | 19 import tensorflow as tf namespace 140 inttype = tf.int16 144 inttype = tf.int8 151 input_data = tf.reshape(input_data, fc_input_format) 167 weights = tf.reshape(weights, fc_weights_format) 191 weights = tf.reshape(weights, fc_weights_format) 210 weights = tf.experimental.numpy.append(weights, 0) 214 weights = tf.convert_to_tensor(temp) 229 weights = tf.reshape(weights, fc_weights_format)
|
D | add_mul_settings.py | 19 import tensorflow as tf namespace 88 inttype_tf = tf.int16 91 inttype_tf = tf.int8 108 interpreter.set_tensor(input_details[0]["index"], tf.cast(input_data1, inttype_tf)) 109 interpreter.set_tensor(input_details[1]["index"], tf.cast(input_data2, inttype_tf))
|
D | lstm_settings.py | 20 import tensorflow as tf namespace 101 input_data = tf.reshape(input_data, input_dims) 114 weights = tf.reshape(weights, [self.number_inputs, number_cells * number_w_b]) 124 hidden_weights = tf.reshape(hidden_weights, [number_cells, number_cells * number_w_b]) 135 biases = tf.reshape(biases, [number_cells * number_w_b]) 149 input_layer_transposed = tf.transpose(input_layer, perm=[1, 0, 2]) 174 interpreter = self.convert_and_interpret(model, tf.int8, input_data, dataset_shape=shape) 299 interpreter.set_input(tf.cast(input_data, tf.int8), input_details[0]["index"])
|
D | conv_settings.py | 19 import tensorflow as tf namespace 203 return tf.convert_to_tensor(quantized_data), scale, zero_point 207 inttype = tf.int16 211 inttype = tf.int8 227 weights = tf.reshape(weights, w_shape) 302 weights = tf.convert_to_tensor(temp) 324 weights = tf.reshape(weights, weight_shape)
|
D | model_extractor.py | 26 import tensorflow as tf namespace 290 interpreter.set_tensor(input_details[0]["index"], tf.cast(input_data, tf.int8))
|
D | README.md | 36 pip install numpy packaging tensorflow tf-keras~=2.16
|
D | generate_test_data.py | 35 import tensorflow as tf namespace 3217 if version.parse(tf.__version__) < TestSettings.REQUIRED_MINIMUM_TENSORFLOW_VERSION: 3218 print("Unsupported tensorflow version, ", version.parse(tf.__version__))
|