NCE or negative sampling layer

Hi experts,
I have searched the dl4j doc and wonder if we have anything similar to tensorflow’s sampled softmax layer that implements NCE loss /negative loss. tf.nn.sampled_softmax_loss  |  TensorFlow v2.9.1
I know dl4j word2vec model is trained by negative sampling but not sure how to use it in a multiplayer FC network for a general high dimensional classification task.
Thanks in advance

1 Like

Unfortunately NCE loss isn’t implemented as standalone loss function for SameDiff yet. Mind filing an issue at github?

Thanks for the info. Do we have standalone negative sampling loss function?