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

Function FractionalAvgPool

tensorflow/go/op/wrappers.go:9638–9655  ·  view source on GitHub ↗

Performs fractional average pooling on the input. Fractional average pooling is similar to Fractional max pooling in the pooling region generation step. The only difference is that after pooling regions are generated, a mean operation is performed instead of a max operation in each pooling region.

(scope *Scope, value tf.Output, pooling_ratio []float32, optional ...FractionalAvgPoolAttr)

Source from the content-addressed store, hash-verified

9636//
9637// Returns output tensor after fractional avg pooling.row pooling sequence, needed to calculate gradient.column pooling sequence, needed to calculate gradient.
9638func FractionalAvgPool(scope *Scope, value tf.Output, pooling_ratio []float32, optional ...FractionalAvgPoolAttr) (output tf.Output, row_pooling_sequence tf.Output, col_pooling_sequence tf.Output) {
9639 if scope.Err() != nil {
9640 return
9641 }
9642 attrs := map[string]interface{}{"pooling_ratio": pooling_ratio}
9643 for _, a := range optional {
9644 a(attrs)
9645 }
9646 opspec := tf.OpSpec{
9647 Type: "FractionalAvgPool",
9648 Input: []tf.Input{
9649 value,
9650 },
9651 Attrs: attrs,
9652 }
9653 op := scope.AddOperation(opspec)
9654 return op.Output(0), op.Output(1), op.Output(2)
9655}
9656
9657// FractionalMaxPoolGradAttr is an optional argument to FractionalMaxPoolGrad.
9658type FractionalMaxPoolGradAttr func(optionalAttr)

Callers 1

TEST_FFunction · 0.85

Calls 4

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

Tested by 1

TEST_FFunction · 0.68