Comments (3)
I am also receiving this warning but ignoring it. One thing that I had in mind to test is to specify input_shape
, but I am not sure how to specify that given the input structure of ConditionalRNN
.
from cond_rnn.
Glad to see that CondRNN could give you a boost in accuracy!
First, regarding the message, I think this is fine. Conceptually, a Sequential model is not expected to receive multiple inputs. Even though Keras is complaining, it's still doing the job correctly.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'tuple'> input: (<tf.Tensor 'IteratorGetNext:0' shape=(None, 24, 5) dtype=float32>, <tf.Tensor 'IteratorGetNext:1' shape=(None, 8) dtype=float64>, <tf.Tensor 'IteratorGetNext:2' shape=(None, 2) dtype=float64>)
Consider rewriting this model with the Functional API.
I don't see any errors in your code. I checked, and both Sequential are Functional output the same code.
On the dummy_stations_example.py
example, I added the Functional API code and I ran two simple training:
Sequential
788/788 - 14s - loss: 0.0445 - val_loss: 0.0171
Epoch 2/10
788/788 - 13s - loss: 0.0160 - val_loss: 0.0156
Epoch 3/10
788/788 - 14s - loss: 0.0155 - val_loss: 0.0154
Epoch 4/10
788/788 - 16s - loss: 0.0151 - val_loss: 0.0155
Epoch 5/10
788/788 - 13s - loss: 0.0150 - val_loss: 0.0150
Epoch 6/10
788/788 - 13s - loss: 0.0150 - val_loss: 0.0148
Epoch 7/10
788/788 - 13s - loss: 0.0149 - val_loss: 0.0147
Epoch 8/10
788/788 - 14s - loss: 0.0150 - val_loss: 0.0149
Epoch 9/10
788/788 - 14s - loss: 0.0149 - val_loss: 0.0152
Epoch 10/10
788/788 - 14s - loss: 0.0149 - val_loss: 0.0146
Functional
Functional API
Epoch 1/10
788/788 - 14s - loss: 0.0317 - val_loss: 0.0165
Epoch 2/10
788/788 - 14s - loss: 0.0160 - val_loss: 0.0156
Epoch 3/10
788/788 - 14s - loss: 0.0153 - val_loss: 0.0149
Epoch 4/10
788/788 - 15s - loss: 0.0150 - val_loss: 0.0153
Epoch 5/10
788/788 - 14s - loss: 0.0150 - val_loss: 0.0155
Epoch 6/10
788/788 - 13s - loss: 0.0149 - val_loss: 0.0151
Epoch 7/10
788/788 - 14s - loss: 0.0148 - val_loss: 0.0150
Epoch 8/10
788/788 - 13s - loss: 0.0149 - val_loss: 0.0147
Epoch 9/10
788/788 - 13s - loss: 0.0148 - val_loss: 0.0147
Epoch 10/10
788/788 - 16s - loss: 0.0148 - val_loss: 0.0146
They look pretty similar in terms of performance/loss.
from cond_rnn.
@adaj yes from my experience, you can safely ignore this warning. Keras still does the job well.
from cond_rnn.
Related Issues (20)
- [QUESTION]
- [QUESTION] Difference between ConditionalRNN and Other Approach HOT 10
- ConditionalRNN or ConditionalRecurrent? HOT 8
- Bidirectional Layer with Functional API HOT 8
- Basic conditional LSTM HOT 2
- Embeding Layer with ConditionalRecurrent HOT 3
- Simple LSTM HOT 7
- No more than 10 conditional features HOT 14
- CondLSTM with Embedding layer HOT 12
- Confusion between conditions? HOT 6
- Adding dropout layer to stacked conditional RNNs HOT 1
- Installation issue HOT 3
- what does the static data shape? HOT 5
- Encoder-Decoder HOT 7
- Confusion between double conditions?
- pytorch version available? HOT 7
- Condition vector size different than LSTM hidden states?
- Can Conditional-BiLSTM works?
- Error with adding Embedding layer before ConditionalRecurrent
- General Usage + Validation Data Usage + Batch Size
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cond_rnn.