-
Notifications
You must be signed in to change notification settings - Fork 1
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
Model does not initialize reliably #7
Comments
Sorry you are having trouble. I think it doesn't make progress once there is a NaN because of the way arithmetic with NaNs works. I should probably have a check in there that if the initial f-est is NaN to error out and if f-est becomes NaN later, to fail the step. But think the bigger question is why you are getting NaNs in the first place, especially for the initial f-est. With Poisson loss, it seems the most likely way that would happen is if a model value is negative. But with the random initial guess algorithms GenTen has, that shouldn't happen. It looks like currently GenTen does not have a way to save the initial guess, but I can add that. Are you using the command-line interface or the python interface? |
@scott-uses-git are you still having trouble with this? I recently added an option to save the initial guess, which would allow you to inspect it when you see NaN for the initial f-est, or reuse an initial guess that appears to be good. Also, are you sure your tensor does not have negative values in it? That would be a sure-fire way to get NaNs with Poisson loss. To ensure the code is working correctly, you could try running an open example from FROSTT. The LBNL-network tensor is fairly small and runs pretty fast with GCP. Also, I recently pushed a python example for the streaming GCP algorithm that uses the Chicago Crime tensor here that includes calling static GCP for comparison purposes. That example uses Bernoulli loss, but could easily skip the step of setting the nonzero values to 1 and use Poisson loss instead. |
Hello! I'm very sorry for not responding to this issue that I opened. I figured out that there were slices of my input tensor that were extremely sparse. ex: 10 nonzero entries in a 100*8000 slice. I removed these extremely sparse slices and the model was able to initialize reliably. I apologize if you spent any of your time looking into this :( Thank you for following up. Scott |
Hmm, that's interesting, and thanks for the reply. I'll have to think about why an extremely sparse slice would cause a problem as it isn't obvious to me what that would be problematic. |
Hello again,
I've been having trouble getting my model to reliably initialize. The problem arises when initial f-est is "nan" - the model will get completely stuck and wont make any progress
The only workaround I have found is to restart the model over and over until it finds a good random starting point. Even then, the initial f-est is near machine limit but the algorithm is able to quickly converge to a more reasonable parameter space.
Can you recommend any setting adjustments I can make to get a better model initialization?
Here is some more info on my data and model settings - unfortunately, my data is proprietary and I am not able to share it.
I would greatly appreciate any help or advice!
Thanks,
Scott
The text was updated successfully, but these errors were encountered: