Performs fractional max pooling on the input. Fractional max pooling is slightly different than regular max pooling. In regular max pooling, you downsize an input set by taking the maximum value of smaller N x N subsections of the set (often 2x2), and try to reduce the set by a factor of N, where
(scope *Scope, value tf.Output, pooling_ratio []float32, optional ...FractionalMaxPoolAttr)
| 9862 | // |
| 9863 | // Returns output tensor after fractional max pooling.row pooling sequence, needed to calculate gradient.column pooling sequence, needed to calculate gradient. |
| 9864 | func FractionalMaxPool(scope *Scope, value tf.Output, pooling_ratio []float32, optional ...FractionalMaxPoolAttr) (output tf.Output, row_pooling_sequence tf.Output, col_pooling_sequence tf.Output) { |
| 9865 | if scope.Err() != nil { |
| 9866 | return |
| 9867 | } |
| 9868 | attrs := map[string]interface{}{"pooling_ratio": pooling_ratio} |
| 9869 | for _, a := range optional { |
| 9870 | a(attrs) |
| 9871 | } |
| 9872 | opspec := tf.OpSpec{ |
| 9873 | Type: "FractionalMaxPool", |
| 9874 | Input: []tf.Input{ |
| 9875 | value, |
| 9876 | }, |
| 9877 | Attrs: attrs, |
| 9878 | } |
| 9879 | op := scope.AddOperation(opspec) |
| 9880 | return op.Output(0), op.Output(1), op.Output(2) |
| 9881 | } |
| 9882 | |
| 9883 | // PrelinearizeTupleAttr is an optional argument to PrelinearizeTuple. |
| 9884 | type PrelinearizeTupleAttr func(optionalAttr) |