MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RandomUniformInt

Function RandomUniformInt

tensorflow/go/op/wrappers.go:29729–29746  ·  view source on GitHub ↗

Outputs random integers from a uniform distribution. The generated values are uniform integers in the range `[minval, maxval)`. The lower bound `minval` is included in the range, while the upper bound `maxval` is excluded. The random integers are slightly biased unless `maxval - minval` is an exac

(scope *Scope, shape tf.Output, minval tf.Output, maxval tf.Output, optional ...RandomUniformIntAttr)

Source from the content-addressed store, hash-verified

29727//
29728// Returns A tensor of the specified shape filled with uniform random integers.
29729func RandomUniformInt(scope *Scope, shape tf.Output, minval tf.Output, maxval tf.Output, optional ...RandomUniformIntAttr) (output tf.Output) {
29730 if scope.Err() != nil {
29731 return
29732 }
29733 attrs := map[string]interface{}{}
29734 for _, a := range optional {
29735 a(attrs)
29736 }
29737 opspec := tf.OpSpec{
29738 Type: "RandomUniformInt",
29739 Input: []tf.Input{
29740 shape, minval, maxval,
29741 },
29742 Attrs: attrs,
29743 }
29744 op := scope.AddOperation(opspec)
29745 return op.Output(0)
29746}
29747
29748// StatelessMultinomialAttr is an optional argument to StatelessMultinomial.
29749type StatelessMultinomialAttr func(optionalAttr)

Callers 1

TESTFunction · 0.85

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 1

TESTFunction · 0.68