Skip to content

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

@Ehijas

Description

@Ehijas

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions