How to produce a variable size distance matrix in keras?
问题 What I am trying to achieve now is to create a custom loss function in Keras that takes in two tensors (y_true, y_pred) with shapes (None, None, None) and (None, None, 3) , respectively. However, the None 's are so, that the two shapes are always equal for every (y_true, y_pred) . From these tensors I want to produce two distance matrices that contain the squared distances between every possible point pair (the third, length 3 dimension contains x, y, and z spatial values) inside them and