FlowMO icon indicating copy to clipboard operation
FlowMO copied to clipboard

The appearance of full nan

Open anny0316 opened this issue 3 years ago • 4 comments

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

anny0316 avatar Sep 06 '21 10:09 anny0316

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 avatar Sep 20 '21 12:09 Ryan-Rhys

@henrymoss

Ryan-Rhys avatar Nov 24 '21 16:11 Ryan-Rhys

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

JinhaoGu avatar Nov 24 '21 21:11 JinhaoGu

Hi Jinhao/Anny,

Many thanks for that fix!

Best wishes, Ryan

Ryan-Rhys avatar Dec 01 '21 14:12 Ryan-Rhys