Giter Club home page Giter Club logo

Comments (3)

adaj avatar adaj commented on August 11, 2024

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.

philipperemy avatar philipperemy commented on August 11, 2024

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.

philipperemy avatar philipperemy commented on August 11, 2024

@adaj yes from my experience, you can safely ignore this warning. Keras still does the job well.

from cond_rnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.