-
Notifications
You must be signed in to change notification settings - Fork 628
Description
Hi,
I have a set of training data, and for each of those examples I want to "learn embeddings on the fly", such is done in some NLP models for example. I.e., have a bank of parameters for training example 1, 2, 3, etc., and when training example 1 comes up I want to use its parameters in the model. I then have a classifier circuit which will have the same trainable parameters for all examples:
Encoding (different for each example) --> classifier (same for all examples) ( --> readout)
Apologies for what might be a basic question (I'm coming from quantum rather than ML background), but I'm struggling to implement this. I've come across nn.embedding_lookup and resolve_parameters which look like they could do what I want -- select the appropriate encoding params for my example, and put then into the encoding circuit but I can't work out how to integrate this into a model. There's also the keras.layers.Embedding which does this sort of thing automatically classically, but it would be quite a job to make a quantum version of that with circuits rather than vectors... Any pointers appreciated!