-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
examples/charRNN Crashes When Run #542
Comments
I am getting the same error, running charRNN with |
The problem was caused by sampling from a log prob distribution instead of from a normal prob. Since log probs are negative numbers, the sampling will always go out of bound without having a sum larger than a positive number in 0 to 1. Update the sample func in examples/chartRNN/util.go by converting the log probs back to normal probs will suppress this error.
However, there are other errors that will crash. In addition, gorgonia has no real capability of doing RNN as it is using a static graph for computation. To really support LSTM or other RNN, it may need to create new Op for RNN capable of doing BPTT. |
Hi @wzzhu can you suggest a library to do RNN (LSTM, GRU), pls |
I correct one wrong statement above. "In addition, gorgonia has no real capability of doing RNN as it is using a static graph for computation.". By not following the implementation of CharRNN which doesn't share weights, we can implement the RNN directly using the shared weights to construct a unrolled graph given the fixed sequence size. So gorgonia can still do RNN on condition that we construct the computation graph with shared weight nodes and loop each input in the sequence. Therefore we can still use gorgonia for RNN. But it needs heavy implementation. e.g.,
|
@wzzhu sorry that I ask too many questions |
Hi there, I tried out
examples/charRNN
and it crashes when it is run (using "go run .") here is the output + call-stack:
The work-around appears to be to update the following (add range limits to for loops):
api_utils.go:
But then after dong that - there is a different crash here:
I notice this example is quite old - is there a more up to date example of using RNN in gorgonia?
Thanks!
The text was updated successfully, but these errors were encountered: