Code accomplishing all of the above, below: Sequences = np.asarray(Sequences) Lastly, as a debug pro-tip, print ALL the shapes for your data. The next step's to ensure data is fed in expected format for LSTM, that'd be a 3D tensor with dimensions (batch_size, timesteps, features) - or equivalently, (num_samples, timesteps, channels). A simple conversion is: x_array = np.asarray(x_list). The problem's rooted in using lists as inputs, as opposed to Numpy arrays Keras/TF doesn't support former. Others may be faulty data preprocessing ensure everything is properly formatted (categoricals, nans, strings, etc). TL DR Several possible errors, most fixed with x = np.asarray(x).astype('float32').
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |