Home › Forums › KX Solutions › Anyone using the Tensorflow functional API from inside q(embedpy)? › Re: Anyone using the Tensorflow functional API from inside q(embedpy)?
-
Thanks a ton for the detailed replies, @rocuinneagain. I see that I was making a couple of errors:
1. Using all the tensorflow function calls with “<” included, i.e intending to get them to return q. I’m much better off leaving them without the “<“, – using them as a default embedpy , as mentioned here :
https://code.kx.com/q/ml/embedpy/userguide/#function-calls
2. Doing a .p.eval”Time2Vec(2)” – causes the following warning:
WARNING:tensorflow:AutoGraph could not transform <bound method Time2Vec.call of <__main__.Time2Vec object at 0x7fbf09ad6160>> and will run it as-is.
Cause: Unable to locate the source code of <bound method Time2Vec.call of <__main__.Time2Vec object at 0x7fbf09ad6160>>. Note that functions defined in certain environments, like the interactive Python shell, do not expose their source code. If that is the case, you should define them in a .py source file. If you are certain the code is graph-compatible, wrap the call using @tf.autograph.experimental.do_not_convert. Original error: source code not available
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convertWhich I avoided using the following:(
(.p.get`Time2Vec)[2] – seems strange, that the .p.eval should cause that warning, which the .p.get `Time2Vec does not.
I
I’ll read the documentation again.
Cheers,
Krishna