Sampled Softmax in Keras Model
问题 Some approaches I have considered: Inheriting from Model class Sampled softmax in tensorflow keras Inheriting from Layers class How can I use TensorFlow's sampled softmax loss function in a Keras model? Of the two approaches the Model approach is cleaner, as the layers approach is a little hacky - it pushes in the target as part of the input and then bye bye multi-output models. I'd like some help in subclassing the Model class - Specifically: 1) Unlike the first approach - I would like to