recurrent-neural-network

What's the difference between convolutional and recurrent neural networks?

﹥>﹥吖頭↗ 提交于 2019-12-03 03:01:32
问题 I'm new to the topic of neural networks. I came across the two terms convolutional neural network and recurrent neural network . I'm wondering if these two terms are referring to the same thing, or, if not, what would be the difference between them? 回答1: Difference between CNN and RNN are as follows: CNN: CNN takes a fixed size inputs and generates fixed-size outputs. CNN is a type of feed-forward artificial neural network - are variations of multilayer perceptrons which are designed to use

What's the difference between a bidirectional LSTM and an LSTM?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 01:09:59
问题 Can someone please explain this? I know bidirectional LSTMs have a forward and backward pass but what is the advantage of this over a unidirectional LSTM? What is each of them better suited for? 回答1: LSTM in its core, preserves information from inputs that has already passed through it using the hidden state. Unidirectional LSTM only preserves information of the past because the only inputs it has seen are from the past. Using bidirectional will run your inputs in two ways, one from past to

Keras RNN with LSTM cells for predicting multiple output time series based on multiple intput time series

蓝咒 提交于 2019-12-02 19:30:32
I would like to model RNN with LSTM cells in order to predict multiple output time series based on multiple input time series. To be specific, I have 4 output time series, y1[t], y2[t], y3[t], y4[t], each has a length 3,000 (t=0,...,2999). I also have 3 input time series, x1[t], x2[t], x3[t], and each has a length 3,000 sec (t=0,...,2999). The goal is to predict y1[t],.. y4[t] using all the input time series up to this current time point i.e.: y1[t] = f1(x1[k],x2[k],x3[k], k = 0,...,t) y2[t] = f2(x1[k],x2[k],x3[k], k = 0,...,t) y3[t] = f3(x1[k],x2[k],x3[k], k = 0,...,t) y4[t] = f3(x1[k],x2[k]

Non-linear multivariate time-series response prediction using RNN

对着背影说爱祢 提交于 2019-12-02 18:39: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 data. Dataset features: Dataset targets: Unlike most time-series prediction problems, I want to predict

doubts regarding batch size and time steps in RNN

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 18:36:01
In Tensorflow's tutorial of RNN: https://www.tensorflow.org/tutorials/recurrent . It mentions two parameters: batch size and time steps. I am confused by the concepts. In my opinion, RNN introduces batch is because the fact that the to-train sequence can be very long such that backpropagation cannot compute that long(exploding/vanishing gradients). So we divide the long to-train sequence into shorter sequences, each of which is a mini-batch and whose size is called "batch size". Am I right here? Regarding time steps, RNN consists of only a cell (LSTM or GRU cell, or other cell) and this cell

Tensorflow Sequence to sequence model using the seq2seq API ( ver 1.1 and above)

社会主义新天地 提交于 2019-12-02 18:18:28
I'm using TensorFlow v:1.1 , and I would like to implement a sequence to sequence model using tf.contrib.seq2seq api. However I have hard time understanding how to use all the functions (BasicDecoder, Dynamic_decode, Helper, Training Helper ...) provided to build my model. Here is my setup: I would like to "translate" a sequence of feature vector: (batch_size, encoder_max_seq_len, feature_dim) into a sequence of a different length (batch_size, decoder_max_len, 1) . I already have the encoder that is an RNN with LSTM cell, and I get its final state that I would like to feed to the decoder as

Understanding Keras LSTMs: Role of Batch-size and Statefulness

陌路散爱 提交于 2019-12-02 17:46:54
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-training-predicting-python-keras/ Ans also other SO threads like Understanding Keras LSTMs and

Shuffling training data with LSTM RNN

三世轮回 提交于 2019-12-02 17:34:06
Since an LSTM RNN uses previous events to predict current sequences, why do we shuffle the training data? Don't we lose the temporal ordering of the training data? How is it still effective at making predictions after being trained on shuffled training data? In general, when you shuffle the training data (a set of sequences), you shuffle the order in which sequences are fed to the RNN, you don't shuffle the ordering within individual sequences. This is fine to do when your network is stateless: Stateless Case: The network's memory only persists for the duration of a sequence. Training on

Tensorflow dynamic RNN (LSTM): how to format input?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 17:21:14
I have been given some data of this format and the following details: person1, day1, feature1, feature2, ..., featureN, label person1, day2, feature1, feature2, ..., featureN, label ... person1, dayN, feature1, feature2, ..., featureN, label person2, day1, feature1, feature2, ..., featureN, label person2, day2, feature1, feature2, ..., featureN, label ... person2, dayN, feature1, feature2, ..., featureN, label ... there is always the same number of features but each feature might be a 0 representing nothing there is a varying amount of days available for each person, e.g. person1 has 20 days

TensorFlow Embedding Lookup

微笑、不失礼 提交于 2019-12-02 17:20:13
I am trying to learn how to build RNN for Speech Recognition using TensorFlow. As a start, I wanted to try out some example models put up on TensorFlow page TF-RNN As per what was advised, I had taken some time to understand how word IDs are embedded into a dense representation (Vector Representation) by working through the basic version of word2vec model code. I had an understanding of what tf.nn.embedding_lookup actually does, until I actually encountered the same function being used with two dimensional array in TF-RNN ptb_word_lm.py , when it did not make sense any more. what I though tf