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

The appearance of full nan #28

Open
anny0316 opened this issue Sep 6, 2021 · 4 comments
Open

The appearance of full nan #28

anny0316 opened this issue Sep 6, 2021 · 4 comments

Comments

@anny0316
Copy link

anny0316 commented Sep 6, 2021

Hello Ryan-Rhys,
Thanks for you code. I am interested with FlowMo. When I run Gaussian_Process_String_Kernel.ipynb, nan is appeared. I found that the problem is in this sentence: k_results = tf.divide(k_results, tf.sqrt(norm)). Because tf.sqrt(norm)==0. I want to know why there is such a result. Thanks a lot.

Regards
anny

@Ryan-Rhys
Copy link
Owner

Hi Anny,

Thanks for raising this and apologies for the delay in responding! I think tagging either @Ryan-Rhys or @henrymoss should give us a notification in the future!

Handing this one over to @henrymoss since he coded up the string kernel!

Best wishes,
Ryan

@Ryan-Rhys
Copy link
Owner

@henrymoss

@JinhaoGu
Copy link

JinhaoGu commented Nov 24, 2021

Hello Ryan-Rhys, Thanks for you code. I am interested with FlowMo. When I run Gaussian_Process_String_Kernel.ipynb, nan is appeared. I found that the problem is in this sentence: k_results = tf.divide(k_results, tf.sqrt(norm)). Because tf.sqrt(norm)==0. I want to know why there is such a result. Thanks a lot.

Regards anny

Hi Rayn and Anny,

I had the same problem with the demo. This problem came from the function tf.strings.split when split SMILES strings. Just change tf.strings.split to tf.strings.bytes_split in GP/kernels.py line 118 and line 129. The problem should be solved.
@Ryan-Rhys @henrymoss

Best,
Jinhao

@Ryan-Rhys
Copy link
Owner

Hi Jinhao/Anny,

Many thanks for that fix!

Best wishes,
Ryan

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

3 participants