[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.compat.v1.multinomial\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/random_ops.py#L362-L391) |\n\nDraws samples from a multinomial distribution. (deprecated)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.random.multinomial`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/multinomial)\n\n\u003cbr /\u003e\n\n tf.compat.v1.multinomial(\n logits, num_samples, seed=None, name=None, output_dtype=None\n )\n\n| **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`tf.random.categorical`](../../../tf/random/categorical) instead.\n\n#### Example:\n\n # samples has shape [1, 5], where each value is either 0 or 1 with equal\n # probability.\n samples = tf.random.categorical(tf.math.log([[0.5, 0.5]]), 5)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `logits` | 2-D Tensor with shape `[batch_size, num_classes]`. Each slice `[i, :]` represents the unnormalized log-probabilities for all classes. |\n| `num_samples` | 0-D. Number of independent samples to draw for each row slice. |\n| `seed` | A Python integer. Used to create a random seed for the distribution. See [`tf.random.set_seed`](../../../tf/random/set_seed) for behavior. |\n| `name` | Optional name for the operation. |\n| `output_dtype` | The integer type of the output: `int32` or `int64`. Defaults to `int64`. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The drawn samples of shape `[batch_size, num_samples]`. ||\n\n\u003cbr /\u003e"]]