Keras pass data through layers explicitly

645 views Asked by At

I am trying to implement a Pairwise Learning to rank model with keras where features are being computed by deep neural network.

In the pairwise L2R model, while training, I am giving the query, one positive and one negative result. And it is trained on the classification loss by difference of feature vector.

I am able to do compile and fit model successfully but the problem is to actually use this model on test data. As in Pairwise L2R model, at testing time I would have only query and sample pair (no separate negative and positives). And I can use the calculated value before softmax to rank samples.

Is there any way I can use keras to pass data manually at test time through particular trained layers. (In short I have 3 set of inputs at train time and 2 at testing time.)

0

There are 0 answers