Skip to content
New issue

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

In Machine Learning for Audio Classification, in stage of taring our model we stuck with an error #47

Open
Ehijas opened this issue Dec 30, 2022 · 0 comments

Comments

@Ehijas
Copy link

Ehijas commented Dec 30, 2022

Error note

 raise ValueError("Shapes %s and %s are incompatible" % (self, other))

ValueError: Shapes (None, 10) and (None, 2) are incompatible

required python code

from tensorflow.keras.callbacks 
import ModelCheckpoint
from datetime import datetime 

num_epochs = 200
num_batch_size = 32

checkpointer = ModelCheckpoint(filepath='saved_models/audio_classification.hdf5', 
                               verbose=1, save_best_only=True)
start = datetime.now()

model.fit(X_train, y_train, batch_size=num_batch_size, epochs=num_epochs, validation_data=(X_test, y_test), callbacks=[checkpointer], verbose=1)


duration = datetime.now() - start
print("Training completed in time: ", duration)
@Ehijas Ehijas changed the title in LSTM machine learning code based on speech analysis showing an error : ValueError: Shapes (None, 10) and (None, 2) are incompatible In Machine Learning for Audio Classification, in stage of taring our model we stuck with an error Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant