// expected distribution. Based on the implementation in
// "third_party/tensorflow/python/kernel_tests/multinomial_op_test.py".
for probs in [[.85, .05, .1], rand_probs, [1.]]:
weights = np.asarray(probs)if weights_as_dataset:
weights = dataset_ops.Dataset.from_tensors(weights).repeat()
classes = len(probs)
// Create a dataset that samples each integer in `[0, num_datasets)`
// with probability given by `weights[i]`.
After Change
// expected distribution. Based on the implementation in
// "third_party/tensorflow/python/kernel_tests/multinomial_op_test.py".
for probs in [[.85, .05, .1], rand_probs, [1.]]:
weights = _get_weights_of_type(np.asarray(probs), weights_type)
classes = len(probs)
// Create a dataset that samples each integer in `[0, num_datasets)`
// with probability given by `weights[i]`.