-
Anyone using the Tensorflow functional API from inside q(embedpy)?
Hello,
I’m trying to write this code inside q:
def get_model(input_shape, time2vec_dim = 3): inp = Input(input_shape) x = inp time_embedding = keras.layers.TimeDistributed(Time2Vec(time2vec_dim - 1))(x) /*******************/ Equivalent q code is : lyr:.p.import`keras.layers x:lyr[`:Input;<;65;16] /create Input(65,16) time_embedding:lyr[`:TimeDistributed;<;.p.eval("Time2Vec(2)")] / Time2Vec is my own class, defined in a .p file
Now, how do I pass the final (x) in the above line? (marked /******************/)
I tried time_embedding[x], it gives me a “rank” error.
What is the semantic meaning of a (x) passed in the functional API? Code-wise, it seems that we’re passing (x) to an object of TimeDistributed above. Doesn’t quite make sense, could someone please shed light on this issue?
Thanks,
Krishna
Log in to reply.