We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I used tf 2.3 and met segmentation fault (core dumped) error when using representative_dataset_gen(). Code
representative_dataset_gen()
def representative_dataset_gen(): for audio in validation_fingerprints: yield [audio] converter = tf.lite.TFLiteConverter.from_saved_model(flags.train_dir + '/last_model') converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS] converter.allow_custom_ops = True converter.inference_input_type = tf.uint8 converter.inference_output_type = tf.uint8 # converter.representative_dataset = representative_dataset_gen quant_model = converter.convert() with open(flags.train_dir + '/quant_last_model.tflite', 'wb') as w: w.write(quant_model)
Above code can run without error but if I use converter.representative_dataset = representative_dataset_gen, it fail.
converter.representative_dataset = representative_dataset_gen
The type and shape of data are at below. The input layer size is [Batch, 16384]
[Batch, 16384]
type(validation_fingerprints): <class 'numpy.ndarray'> shape(validation_fingerprints): (3093, 16384)
Any suggestion?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I used tf 2.3 and met segmentation fault (core dumped) error when using
representative_dataset_gen()
.Code
Above code can run without error but if I use
converter.representative_dataset = representative_dataset_gen
, it fail.The type and shape of data are at below. The input layer size is
[Batch, 16384]
Any suggestion?
The text was updated successfully, but these errors were encountered: