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

Error with ANN #33

Open
dcuervoAG opened this issue Nov 17, 2022 · 1 comment
Open

Error with ANN #33

dcuervoAG opened this issue Nov 17, 2022 · 1 comment

Comments

@dcuervoAG
Copy link

Hi BGR,
I'm writing because I'm getting an error running the LSAT tool. I have run it multiple times without any problem, however, the last time that I used the app with the Analytic Neural Networks I'm getting this error :
[ERROR] 2022-11-17 15:12:33 Traceback (most recent call last): File "D:\LSAT_Susceptibility\LSAT-main\core\libs\Analysis\ann_calc.py", line 79, in run probab = model.predict_proba(stack_full.T)[:, 1] File "C:\Users\danie\AppData\Local\Programs\Python\Python39\lib\site-packages\sklearn\neural_network_multilayer_perceptron.py", line 1243, in predict_proba y_pred = self._forward_pass_fast(X) File "C:\Users\danie\AppData\Local\Programs\Python\Python39\lib\site-packages\sklearn\neural_network_multilayer_perceptron.py", line 167, in forward_pass_fast activation = safe_sparse_dot(activation, self.coefs[i]) File "C:\Users\danie\AppData\Local\Programs\Python\Python39\lib\site-packages\sklearn\utils\extmath.py", line 153, in safe_sparse_dot ret = a @ b numpy.core._exceptions._ArrayMemoryError: Unable to allocate 24.3 GiB for an array with shape (65329200, 100) and data type float32

So, I don't know why this error appears when the raster type and the type of data are according to the tool request
regards
Daniel

@BGR-EGHA
Copy link
Owner

Hello Daniel,

looks like you are running out of memory while trying to train an Artifical Neural Network (ANN) model using a raster with 65,329,200 cells and 100 discrete values. The unique values might be divided among multiple discrete raster datasets.

You could try decreasing the resolution of the raster and thus decreasing the amount of raster cells or combining the unique values.

So, I don't know why this error appears when the raster type and the type of data are according to the tool request

LSAT does not request discrete or continuous parameters. It just makes a guess based on the type of raster provided (int -> discrete; float -> continuous), see my answer at #28.

If the error is not because of the wrong parameter type could you please share the raster data set (if possible) so I can take a closer look, or tell me the raster size and type?

Cheers,
Nick

P.S. I have been on vacation for the past three weeks and was unable to get back to you sooner.

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