Skip to content
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

Bounds Error in Neural Network Training Process #1091

Closed
CatYukino opened this issue Mar 29, 2024 · 1 comment
Closed

Bounds Error in Neural Network Training Process #1091

CatYukino opened this issue Mar 29, 2024 · 1 comment

Comments

@CatYukino
Copy link

Hi. I'm using Optim.jl to train a neural ODE, while it always appears some bounds errors like:

ERROR: BoundsError: attempt to access 13-element Vector{Float64} at index [1:200]

I checked the code and found that it appeared when I used BFGS and LBFGS. I firstly used ADAM and it worked well, while it converges slowly, which means the time cost is too large... So I chose (L)BFGS and some other second order algorithms, while the boundserror always occurred. I wonder if the design of the model is too complex(in fact there is warning that the problem is stiff), or is there any other choices to solve the problem?

Thanks!

@pkofod
Copy link
Member

pkofod commented Apr 29, 2024

It is very hard to say without more information. From my own experience, it could be that your model did not solve and you did not account for the unfinished state inside the solution option? So if you do sol.u it may not be completely allocated if you're not certain that the model retcode was succes.

I will close it, but if it is an Optim issue, please supply more of the stack trace so I can see where the error is thrown and reopen.

@pkofod pkofod closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants