What does the following Debug Info for tensorflow means?

INFO:rasa_nlu.model:Starting to train component intent_classifier_tensorflow_embedding DEBUG:rasa_nlu.classifiers.embedding_intent_classifier:Check if num_neg 20 is smaller than number of intents 9, else set num_neg to the number of intents - 1

it checks that a number of incorrect intent labels, the algorithm will minimize their similarity to the user input during training ( is less than a total number of intents. It is called “negative sampling”, see original starspace paper:

Is it a or the total number…c oul dyou please elaborate more. This is just a mathematical def. Above 20<9?

num_neg = min(num_neg, number_of_intents - 1):

I am not familiar with the code of this algorithm yet. For me, there is no explanation from the code for the meaning of this. What and why? In my case num_neg is 20 and intents I have is 9…

so, you cannot pick 20 things if you have only 9, one of which is correct, so effectively you have 9-1=8 incorrect intents to pick from. So this resets your num_neg to 8, to avoid error during negative sampling

thanks. Why are they incorrect and what is this 20? I am little off. For what is this?

there is an intent for each example in the nlu training data. This one intent - is the correct intent for this example, all the other intents are therefore incorrect. 20 is a default value for how many such other incorrect intents to use during optimization. It is called “negative sampling”, for more details please read original starspace paper:, and consequent links on the topic there