In case of mfcc
mfcc_data.shape=(26,63)
print(X_features.shape)=(8,26,63)

in melspectrogram
print(mel.shape)=(1,128,81)
print(X_features.shape)=(8,1,128,81)

The shape of both the features must be same.