# tensorflow::ops::RandomGamma

`#include <random_ops.h>`

Outputs random values from the Gamma distribution(s) described by alpha.

## Summary

This op uses the algorithm by Marsaglia et al. to acquire samples via transformation-rejection from pairs of uniform and normal random variables. See <http://dl.acm.org/citation.cfm?id=358414>

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- shape: 1-D integer tensor. Shape of independent samples to draw from each distribution described by the shape parameters given in alpha.
- alpha: A tensor in which each scalar is a "shape" parameter describing the associated gamma distribution.

<br />

Optional attributes (see `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs`):

- seed: If either `seed` or `seed2` are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.
- seed2: A second seed to avoid seed collision.

<br />

Returns:

- `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: A tensor with shape `shape + shape(alpha)`. Each slice `[:, ..., :, i0, i1, ...iN]` contains the samples drawn for `alpha[i0, i1, ...iN]`. The dtype of the output matches the dtype of alpha.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1a54b3819de158eaa8e1f4dd2e09c38350(const ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input alpha)` ||
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1afb5a4dcc9f3b7849c9ccf8e49233c658(const ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input alpha, const https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1a3442325c98888cd41398f85c8dc7215d` | `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1ae108904c41339fe8cced748589ef2622` | `::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1a0a8429580ed9eda5d1b850c9fc9cd7c6() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1ad5e60091b7438c54f6d2457fccba06ed() const ` | ` `` ` |
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1a20b55a813e49ae84f48cd79c87285409() const ` | ` `` ` |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1a62800c601cb18e766b0f41f18f86f335(int64 x)` | `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs` |
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma_1a42984b9ff3911c8867903be5bcd97ac7(int64 x)` | `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs#structtensorflow_1_1ops_1_1_random_gamma_1_1_attrs` |

| ### Structs ||
|---|---|
| [tensorflow::ops::RandomGamma::Attrs](https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/random-gamma/attrs) | Optional attribute setters for [RandomGamma](https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/random-gamma#classtensorflow_1_1ops_1_1_random_gamma). |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### RandomGamma

```
 RandomGamma(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input alpha
)
```

### RandomGamma

```
 RandomGamma(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input alpha,
  const RandomGamma::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### Seed

```
Attrs Seed(
  int64 x
)
```

### Seed2

```
Attrs Seed2(
  int64 x
)
```