-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RNN Shakespeare example giving error #44
Comments
The RNN API has recently been reworked to facilitate the handling of diverse use cases, such as time-series or seq-to-one models, as well as making the symbolic graph compatible with the general feedforward model training function. I made a few examples, which aims to cover brader use cases. Don't hesitate to open a request for changes or additional features that are still missing. |
Did this change again? I'm getting a 'can not find fxn rnn.graph.' I really appreciate you posting tutorials, but I always find the sine/cosine wave example absolute batty. Just difficult to understand. Something simple like time-series with medical or financial data would be easy to grasp: I'm having a hard time following you iter set up. |
It should still be there (https://github.com/apache/incubator-mxnet/blob/master/R-package/R/rnn.graph.R#L14). What version of the package are you rnn.graph function serves as graph builder helper. I'm not aware of a single fits all solution, but I'd be glad to improve the tutorials based on suggestions. |
Right on, your tutorial ran great on my updated instance. From trying to adapt it to my project, I think some extra commenting could help alot. For instance: What is the 'samples' variable? Is it single points from 192 waves at a given time-step? This might be analogous to patient laboratory values or financial indicators at a given time-step. 'seq_len' seems to be the number of observations/time-steps. I'm having errors creating mx.io.arrayiter so it's possible my data structure is wrong. Currently it is a dataframe with x as 68 variables and y as 20k observations. The end goal is to predicting the yth observation for any given x variable. |
Hi, the documentation is admittedly very scarce on these tutorials. I've added some comments and tried to remove some ambiguities in the CPU tutorial: file:///C:/Data/GitHub/mxnet_R_bucketing/docs/TimeSeries_CPU.html The "samples" effectively refer to the number of independent time-series. It has been renamed to "n" in the update. As for data dimensions, an important difference is that whereas in a normal regression problems we would feed network with array of size [num_features X batch_size] with a target of size [batch_size], in a time serie model, features are [num_features X seq_length X batch_size] and target is [seq_length X batch_size], since for each time serie, we have seq_length observations. |
These clarifications helped a ton! I've made it to the training step with my silly minute to minute cryptocurrency data, But think I'm having issues with the '@param seq_len int, number of time steps to unroll.' My thought is it would be the same as the length of sequences it's being fed (100 for your example, 20 for mine). Working with 1,000 sequences of 20x min-obs:
Going straight from your tutorial:
It looks like the issue is with the 'seq_len = 2', trying 'seq_len = 1' produced a similar error, but seq_len=20 gave:
(running on mxnet_1.2.0 prebuilt CPU for windows, although the documentation says it requires CUDA? Thanks again!) |
Correct, Still, it seems like there's a remaining shape issue. I would look at the asctual dimensions of the data and labels fed to the iterator, and to the iterator result as well to confirm the shapes fed to the network. Generating the graph as in the tutorial (with a small seq_len, otherwise it will render forever) should also help identify where' the glitch. |
This code in the tutorial leads to the error:
Error: Error in check.data(train.data, batch.size, TRUE) : could not find function "check.data"
Is this function from an unspecific package?
Additionally, there are several missing files referenced in the tutorial:
rnn_model.R, rnn.R, lstm.R, etc
best,
The text was updated successfully, but these errors were encountered: