-
Notifications
You must be signed in to change notification settings - Fork 18
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
Training a Model #13
Comments
Hey Lauren, I haven't seen this issue before, so thanks for bringing it to my attention! Can you please provide me with the versions you are using for Python, tensorflow, and lightkurve so I can dig into this a bit more? Thanks! |
Hi Adina, Thanks for getting back to me and sorry for not having this information posted earlier! The versions are Python 3.6, tensorflow 2.1.0, lightkurve 1.9.0. If you need anything else then let me know :) |
Hey Lauren, Just wanted to let you know I'm still looking into this! I haven't been able to reproduce the issue yet. Can you please provide what versions of numpy and scipy you're using as well? Thanks! |
Not a problem! Thanks for letting me know :) Sorry about my delayed response, I had a proposal deadline yesterday! My versions are numpy = 1.19.5 and scipy = 1.4.1. Thanks, |
Hi Adina, Just an update, I have tried this now with both the pip install of stella in Python 3.6 and the git install with Python 3.7 and when I get to the ccn.train_models() I get the same error in both versions! Thanks! |
Hello Adina and Lauren, Any updates regarding this? I was also trying to train the CNN using all the flares from Guenther et al. 2020 when I got the same error at cnn.train_models()! I'm using the pip install of stella in Python 3.7. My versions are: tensorflow 2.1.0, lightkurve 2.0.0, numpy 1.19.2, and scipy 1.4.1 I also noticed that tensorflow 2.1.0 requires scipy 1.4.1, while stella's requirements.txt has scipy!=1.4.1. Is this a typo? If not then maybe its causing the error? Thanks, |
Hey @ldoyle4 and @pjstanley1 I think this may be a tensorflow issue. Could you try updating stella to |
Hello Adina, |
Hey @ldoyle4 just checking in to see if there's any update on if this new version fixed your issue as well? |
Hi Adina, Sorry for the delayed response! I'm still getting the same error when I update stella with the command you gave above! I'm not sure if it has something to do with tensorflow or my setup even. I've tried in both python 3.6 and 3.7. For 3.7 my versions are: Sorry for the issues! Thanks, |
Hello again, I reproduced a similar error that was caused by nan values showing up in ds.train_data. The error is: InvalidArgumentError: assertion failed: [predictions must be >=0] [Condition x>= y did not hold element-wise:] [x (sequential/dense_1/Sigmoid:0) = ] [[0.497978717][0.520682096][0.519788146]...] [y (Cast_8/x:0) = ] [0] I traced it back to the light curve download. Some of the flux values were nan. I wrote a script that removed these nans and that seemed to fix this error. Another thing of note, if len(ds.train_data) == len(ds.train_labels) is true then the input training matrices are the same size. Lauren, I hope this helps! |
Hello @pjstanley1 , Just wanted to know how did you clear all the nan values from .npy files of lightkurve in one go. I downloaded all the lightkurve using the inbuilt download function in Stella package itself . I was also trying to reproduce the results for stella from the tutorial provide in the git folder and also encountered the same error. Thanks. |
Hello @pjstanley1 |
Hello @aniruddha7599 and @ansony1691, lightkurve has a function to remove nans from a light curve, but you can also use the pandas drop nans Hope this helps! |
Hi Adina,
I have been trying to follow the tutorial on creating and training a CNN but I'm having issues when using cnn.train_models(). The error looks to be with tensorflow and that the loss functions receives 2 tensors with different shapes.... (my google attempt here https://stackoverflow.com/questions/58609967/tensorflow-2-0-condition-x-y-did-not-hold-element-wise).
here is the error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [predictions must be >= 0] [Condition x >= y did not hold element-wise:] [x (sequential/dense_1/Sigmoid:0) = ] [[0.0393062606][0.0676076859][0.0730998814]...] [y (metrics/precision/Cast_2/x:0) = ] [0]
Was wondering if you can help?
I am basically trying to train my CNN using all of the flares from Guenther et al. 2020, as when I used the models in your example some of the flares from my lightcurve were being missed out.
Thanks,
Lauren
The text was updated successfully, but these errors were encountered: