MindSpore
mindspore
mindspore.device_context
mindspore.nn
mindspore.ops
mindspore.ops.primitive
mindspore.mint
mindspore.amp
mindspore.train
mindspore.communication
mindspore.communication.comm_func
mindspore.common.initializer
mindspore.runtime
mindspore.dataset
mindspore.dataset.transforms
mindspore.mindrecord
mindspore.nn.probability
mindspore.rewrite
mindspore.multiprocessing
mindspore.boost
mindspore.numpy
mindspore.scipy
mindspore.utils
mindspore.hal
mindspore.experimental
Environment Variables
MindSpore
»
API
»
mindspore
»
mindspore.Tensor
»
mindspore.Tensor.random_categorical
View page source
mindspore.Tensor.random_categorical
Tensor.
random_categorical
(
num_sample
,
seed
=
0
,
dtype
=
mstype.int64
)
[source]
For details, please refer to
mindspore.ops.random_categorical()
.