RSVP for your your local TensorFlow Everywhere event today!


Generate a sample of face ids given per face probability.


In the following, A1 to An are optional batch dimensions.

num_samples An int32 scalar denoting the number of samples to generate per mesh.
face_weights A float tensor of shape [A1, ..., An, F] where F is number of faces. All weights must be > 0.
seed Optional seed for the random number generator.
stateless Optional flag to use stateless random sampler. If stateless=True, then seed must be provided as shape [2] int tensor. Stateless random sampling is useful for testing to generate the same reproducible sequence across calls. If stateless=False, then a stateful random number generator is used (default behavior).
name Name for op. Defaults to "generate_random_face_indices".

An int32 tensor of shape [A1, ..., An, num_samples] denoting sampled face indices.