lstm

What is the difference between the terms accuracy and validation accuracy

人走茶凉 提交于 2019-12-20 12:34:23
问题 I have used LSTM from Keras to build a model that can detect if two questions on Stack overflow are duplicate or not. When I run the model I see something like this in the epochs. Epoch 23/200 727722/727722 [==============================] - 67s - loss: 0.3167 - acc: 0.8557 - val_loss: 0.3473 - val_acc: 0.8418 Epoch 24/200 727722/727722 [==============================] - 67s - loss: 0.3152 - acc: 0.8573 - val_loss: 0.3497 - val_acc: 0.8404 Epoch 25/200 727722/727722 [=========================

LSTM Autoencoder for time series prediction

自闭症网瘾萝莉.ら 提交于 2019-12-20 11:28:39
问题 I am trying to build an LSTM Autoencoder to predict Time Series data. Since I am new to Python I have mistakes in the decoding part. I tried to build it up like here and Keras. I could not understand the difference between the given examples at all. The code that I have right now looks like: Question 1: is how to choose the batch_size and input_dimension when each sample has 2000 values? Question 2: How to get this LSTM Autoencoder working (the model and the prediction) ? This ist just the

How do I train tesseract 4 with image data instead of a font file?

被刻印的时光 ゝ 提交于 2019-12-20 10:46:20
问题 I'm trying to train Tesseract 4 with images instead of fonts. In the docs they are explaining only the approach with fonts, not with images. I know how it works, when I use a prior version of Tesseract but I didn't get how to use the box/tiff files to train with LSTM in Tesseract 4. I looked into tesstrain.sh, which is used to generate LSTM training data but couldn't find anything helpful. Any ideas? 来源: https://stackoverflow.com/questions/43352918/how-do-i-train-tesseract-4-with-image-data

Non-linear multivariate time-series response prediction using RNN

一个人想着一个人 提交于 2019-12-20 09:25:21
问题 I am trying to predict the hygrothermal response of a wall, given the interior and exterior climate. Based on literature research, I believe this should be possible with RNN but I have not been able to get good accuracy. The dataset has 12 input features (time-series of exterior and interior climate data) and 10 output features (time-series of hygrothermal response), both containing hourly values for 10 years. This data was created with hygrothermal simulation software, there is no missing

Keras - stateful vs stateless LSTMs

拟墨画扇 提交于 2019-12-20 09:22:54
问题 I'm having a hard time conceptualizing the difference between stateful and stateless LSTMs in Keras. My understanding is that at the end of each batch, the "state of the network is reset" in the stateless case, whereas for the stateful case, the state of the network is preserved for each batch, and must then be manually reset at the end of each epoch. My questions are as follows: 1. In the stateless case, how is the network learning if the state isn't preserved in-between batches? 2. When

Doubts regarding `Understanding Keras LSTMs`

大憨熊 提交于 2019-12-20 08:45:58
问题 I am new to LSTMs and going through the Understanding Keras LSTMs and had some silly doubts related to a beautiful answer by Daniel Moller. Here are some of my doubts: There are 2 ways specified under the Achieving one to many section where it’s written that we can use stateful=True to recurrently take the output of one step and serve it as the input of the next step (needs output_features == input_features). In the One to many with repeat vector diagram, the repeated vector is fed as input

What is the difference between CuDNNLSTM and LSTM in Keras?

拟墨画扇 提交于 2019-12-20 08:41:01
问题 In Keras , the high-level deep learning library, there are multiple types of recurrent layers; these include LSTM (Long short term memory) and CuDNNLSTM . According to the Keras documentation, a CuDNNLSTM is a: Fast LSTM implementation backed by CuDNN. Can only be run on GPU, with the TensorFlow backend. It is my belief that Keras automatically uses the GPU wherever possible. According to the TensorFlow build instructions, to have a working TensorFlow GPU backend, you will need CuDNN: The

Understanding Keras LSTMs: Role of Batch-size and Statefulness

人盡茶涼 提交于 2019-12-20 08:29:50
问题 Sources There are several sources out there explaining stateful / stateless LSTMs and the role of batch_size which I've read already. I'll refer to them later in my post: [1] https://machinelearningmastery.com/understanding-stateful-lstm-recurrent-neural-networks-python-keras/ [2] https://machinelearningmastery.com/stateful-stateless-lstm-time-series-forecasting-python/ [3] http://philipperemy.github.io/keras-stateful-lstm/ [4] https://machinelearningmastery.com/use-different-batch-sizes

Check perplexity of a Language Model

家住魔仙堡 提交于 2019-12-20 06:17:02
问题 I created a language model with Keras LSTM and now I want to assess wether it's good so I want to calculate perplexity. What is the best way to calc perplexity of a model in Python? 回答1: I've come up with two versions and attached their corresponding source, please feel free to check the links out. def perplexity_raw(y_true, y_pred): """ The perplexity metric. Why isn't this part of Keras yet?! https://stackoverflow.com/questions/41881308/how-to-calculate-perplexity-of-rnn-in-tensorflow https

The loss and accuracy of this LSTM both drop to nearly 0 at the same epoch

♀尐吖头ヾ 提交于 2019-12-20 04:07:59
问题 I'm trying to train an LSTM to predict the the Nth token using the N-1 tokens preceding it For each One-Hot encoded token, I try to predict the next token. After three layers of LSTM, the results are fed to a Dense layer (wrapped in he TimeDistributed layer wrapper) to re-encode the results into the same One-Hot encoding. Oddly enough, after a few epochs the accuracy (in both train and validation) drops to nearly 0 (bad news), while the loss also drops to nearly 0 (good news?). Why does this