Sample LSTM & GRU code crashes
See original GitHub issuelet 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:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
let GRU = new architect.GRU(4, 5, 1);
also crashes with “ReferenceError: blocks is not defined”.Going to close thanks to
v0.3.0
.