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)
| 29727 | // |
| 29728 | // Returns A tensor of the specified shape filled with uniform random integers. |
| 29729 | func 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. |
| 29749 | type StatelessMultinomialAttr func(optionalAttr) |