question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sample LSTM & GRU code crashes

See original GitHub issue

let LSTM = new architect.LSTM(4, 5, 1); Crashes with “You have to specify at least 3 layer_sizes”.

Problem code:

    const layer_sizes_and_options = Array.from(arguments);

    const output_size_or_options = layer_sizes_and_options.slice(-1);
    
    let layer_sizes, options
    
    // find out if options were passed
    if (typeof output_size_or_options === 'number') {
      layer_sizes = layer_sizes_and_options;
      options = {};
    } else {
      layer_sizes = layer_sizes_and_options.slice(layer_sizes_and_options.length - 1);
      options = output_size_or_options;
    }

    if (layer_sizes.length < 3) {
      throw new Error('You have to specify at least 3 layer_sizes');
    }

layer_sizes.length returns 1.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dan-ryancommented, Jul 17, 2019

let GRU = new architect.GRU(4, 5, 1); also crashes with “ReferenceError: blocks is not defined”.

0reactions
luiscarbonellcommented, Jul 19, 2019

Going to close thanks to v0.3.0 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash course in LSTM Networks. Recurrent Neural Networks
Traditional neural networks can't do this, and it seems like a major shortcoming. For example, imagine you want to classify what kind of...
Read more >
Spatio-Temporal ConvLSTM for Crash Prediction
This post talks about a unique empirical study using ConvLSTM deep-learning model and ArcPy to predict next-day crash risk locations with time sequences...
Read more >
PyTorch LSTM crashing on colab gpu (works fine on cpu)
Hello I have following LSTM which runs fine on a CPU. import torch class LSTMForecast(torch.nn.Module): """ A very simple baseline LSTM ...
Read more >
Time Series Prediction with LSTM Recurrent Neural Networks ...
These examples will show exactly how you can develop your own differently structured LSTM networks for time series predictive modeling problems.
Read more >
PyTorch Tutorial - RNN & LSTM & GRU - Recurrent Neural Nets
Implement a Recurrent Neural Net (RNN) in PyTorch! Learn how we can use the nn.RNN module and work with an input sequence.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found