As per my understanding, the sizes of your Xtrain and Ytrain datasets are not matching.
The method to fix this issue will depend on the how the data is organized. If it's a single sequence of data and Xtrain has been reshaped to be of size 5 * 576, then you should be able to reshape Ytrain in similar manner.
However, if these are unrelated datasets, then it will depend on the data itself. If Xtrain has 5 features, and Ytrain has only one, you cannot use Ytrain with the same model.