`#include <nn_ops.h>`

Optional attribute setters for FractionalAvgPool.

Public attributes | |
---|---|

`deterministic_ = false` | `bool` |

`overlapping_ = false` | `bool` |

`pseudo_random_ = false` | `bool` |

`seed2_ = 0` | `int64` |

`seed_ = 0` | `int64` |

Public functions | |
---|---|

`Deterministic(bool x)` | `TF_MUST_USE_RESULT Attrs` When set to True, a fixed pooling region will be used when iterating over a FractionalAvgPool node in the computation graph. |

`Overlapping(bool x)` | `TF_MUST_USE_RESULT Attrs` When set to True, it means when pooling, the values at the boundary of adjacent pooling cells are used by both cells. |

`PseudoRandom(bool x)` | `TF_MUST_USE_RESULT Attrs` When set to True, generates the pooling sequence in a pseudorandom fashion, otherwise, in a random fashion. |

`Seed(int64 x)` | `TF_MUST_USE_RESULT Attrs` If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. |

`Seed2(int64 x)` | `TF_MUST_USE_RESULT Attrs` An second seed to avoid seed collision. |

bool tensorflow::ops::FractionalAvgPool::Attrs::deterministic_ = false

bool tensorflow::ops::FractionalAvgPool::Attrs::overlapping_ = false

bool tensorflow::ops::FractionalAvgPool::Attrs::pseudo_random_ = false

int64 tensorflow::ops::FractionalAvgPool::Attrs::seed2_ = 0

int64 tensorflow::ops::FractionalAvgPool::Attrs::seed_ = 0

TF_MUST_USE_RESULT Attrs tensorflow::ops::FractionalAvgPool::Attrs::Deterministic( bool x )

When set to True, a fixed pooling region will be used when iterating over a FractionalAvgPool node in the computation graph.

Mainly used in unit test to make FractionalAvgPool deterministic.

Defaults to false

TF_MUST_USE_RESULT Attrs tensorflow::ops::FractionalAvgPool::Attrs::Overlapping( bool x )

When set to True, it means when pooling, the values at the boundary of adjacent pooling cells are used by both cells.

For example:

`index 0 1 2 3 4`

`value 20 5 16 3 7`

If the pooling sequence is [0, 2, 4], then 16, at index 2 will be used twice. The result would be [41/3, 26/3] for fractional avg pooling.

Defaults to false

TF_MUST_USE_RESULT Attrs tensorflow::ops::FractionalAvgPool::Attrs::PseudoRandom( bool x )

When set to True, generates the pooling sequence in a pseudorandom fashion, otherwise, in a random fashion.

Check paper Benjamin Graham, Fractional Max-Pooling for difference between pseudorandom and random.

Defaults to false

TF_MUST_USE_RESULT Attrs tensorflow::ops::FractionalAvgPool::Attrs::Seed( int64 x )

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.

Defaults to 0

TF_MUST_USE_RESULT Attrs tensorflow::ops::FractionalAvgPool::Attrs::Seed2( int64 x )

An second seed to avoid seed collision.

Defaults to 0

© 2020 The TensorFlow Authors. All rights reserved.

Licensed under the Creative Commons Attribution License 3.0.

Code samples licensed under the Apache 2.0 License.

https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fractional-avg-pool/attrs