Giter VIP home page Giter VIP logo

Comments (3)

drasmuss avatar drasmuss commented on July 20, 2024

If you use h = nengo_dl.Layer(tf.keras.layers.LSTM(units=128))(inp, shape_in=(n_steps, d)) that should work (where n_steps is the number of timesteps in your data and d is the dimensionality of the data on each timestep).

from nengo-dl.

arvoelke avatar arvoelke commented on July 20, 2024

Thanks. Got this to work with the following code:

with nengo.Network(seed=seed) as net:
    nengo_dl.configure_settings(
        trainable=None, stateful=False, keep_history=False,
    )
   
    inp = nengo.Node(np.zeros(np.prod(train_images.shape[1:])))

    h = nengo_dl.Layer(tf.keras.layers.LSTM(units=128))(
        inp, shape_in=(train_images.shape[1], 1))

    out = nengo_dl.Layer(tf.keras.layers.Dense(units=10))(h)
    p = nengo.Probe(out)

and using train_images.reshape((train_images.shape[0], 1, -1)) in place of train_images where passed to sim. Note this passes the entire sequence in one step, rather than the usual Nengo approach of iterating across each time-step in the simulation.

from nengo-dl.

drasmuss avatar drasmuss commented on July 20, 2024

Marking this as resolved since the fix above works!

from nengo-dl.

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.