Category : lstm

I’m currently training a seq2seq encoder-decoder network powered by LSTM in TensorFlow 2.x. The main problem right now is the loss approaches to NaN and the prediction returned are all NaN as well. I understand the possibility of exploding/vanishing gradients and have deployed several ways to try and combat it (ex: adding min-max layers, adding ..

Read more

I have data with 561 features and 6 labels (1-6). my train data has shape (7352,562) and my test data has shape (2947,562) like this: then I access it using dataframe and split it into data+features and labels path_data_train= r’/content/drive/MyDrive/train_data.xlsx’ df_train = pd.read_excel(path_data_train) path_data_test= r’/content/drive/MyDrive/test_data.xlsx’ df_test = pd.read_excel(path_data_test) trainX = df_train.iloc[:, 0:-1] trainy = df_train[‘label’] ..

Read more

I run an example with the LSTM model with Keras. Data. x_train = Train[:,0:-1] y_train = Train[:,-1] x_test = Test[:,0:-1] y_test = Test[:,-1] x_train = np.reshape(x_train,(x_train.shape[0],x_train.shape[1],1)) y_train = np.reshape(y_train,(y_train.shape[0],1)) x_test = np.reshape(x_test,(x_test.shape[0],x_test.shape[1],1)) y_test = np.reshape(y_test,(y_test.shape[0],1)) Check dimensions of training and testing set. size before appling reshape: (2900, 11) (2900,) (730, 11) (730,) size after appling ..

Read more

I have a question that I would like to ask please. I was wondering if there is a way to customize LSTM objective function. for example my goal is to maximize some function and I want LSTM to find the best combination of maximizing that function. Is there a way to do that? Source: Python ..

Read more