Audio classification model giving wrong output

I built audio classification model with tensorflow on CPU after retraining model with new datasets,still model giving output as per old datasets.
I changed hardware still same problem
Please anyone can suggest what could be reason and solution for this ?

Hi @Abhi. It would probably help immensely if you were sharing your code, details about your dataset, your setup, etc…
Thank you.

i have uploaded source code file and model directory structure on below link.
@tagoma please can you check and please can you suggest some solution to overcome this problem.
i have uploaded sample datasets and both class have same dataset i.e 700 samples/class.
model_data

Looking quickly into this, it seems you’re using the same tensor to predict before saving your model and then with the saved model.

If your try again to predict using your saved model with a tensor of random numbers, your prediction will be different :

imported(tf.random.uniform(shape=(1, 16000)))

@tagoma i didn’t get you please can you suggest me where i need to update the code before saving the model and after saving the model?

What you have done follows quite closely this Tensorflow example (fair enough!)

You saved your model like this (I’m not sure you need that specification of the signatures argument though) :

tf.saved_model.save(export, “data”,signatures=signatures)

You can then load it back as you did:

imported = tf.saved_model.load(“data”)

And make prediction with new data, example using a tensor of random numbers:

imported(tf.random.uniform(shape=(1, 16000)))