0

I would like to compute the cosine similarity between two Keras layers, which I am able to do by using the approach suggested in here. However, when I print distance it gives me a tensor object like Tensor("lambda_1/Neg:0", shape=(?, ?, 1), dtype=float32). Now, my question is how is it possible to print the value associated with this Tensor object?

media
  • 433
  • 5
  • 19
  • 1
    I suggest you define a metric that corresponds to what you would like to observe. That can be printed when training and its valued is saved in history so that you can graph it or otherwise inspect it after training. – Pedro Marques Jul 04 '19 at 07:11
  • You must make a model that uses that calculation as "output" and "predict" with that model. – Daniel Möller Jul 04 '19 at 12:27

0 Answers0