TensorFlowASR icon indicating copy to clipboard operation
TensorFlowASR copied to clipboard

Segmentation fault (core dumped)

Open Typelias opened this issue 3 years ago • 2 comments

Hi!

I trained the DeepSpeech2 model using the example scripts. With the trained checkpoints I generated a tflite model using the provided conversion script. I can successfully load and allocate the tensors but as soon as I invoke it fails and gives me Segmentation fault (core dumped).

Code for loading the model:

import tensorflow as tf
import soundfile as sf
wav, rate = sf.read("x.flac", dtype='float32')

model = tf.lite.Interpreter("test.tflite")

outputIndex = model.get_output_details()[0]['index']
model.resize_tensor_input(0, wav.shape)
model.allocate_tensors()
model.set_tensor(0, wav)

model.invoke()

output = model.get_tensor(outputIndex)
print(output)

Typelias avatar Mar 28 '22 11:03 Typelias

@Typelias Could you provide your tensorflow version?

nglehuy avatar Apr 03 '22 02:04 nglehuy

@usimarit TensorFlow version: '2.8.0' Do you need any more information?

Typelias avatar Apr 04 '22 08:04 Typelias