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

Function Cumprod

tensorflow/go/op/wrappers.go:22185–22202  ·  view source on GitHub ↗

Compute the cumulative product of the tensor `x` along `axis`. By default, this op performs an inclusive cumprod, which means that the first element of the input is identical to the first element of the output: ```python tf.cumprod([a, b, c]) # => [a, a * b, a * b * c] ``` By setting the `exclus

(scope *Scope, x tf.Output, axis tf.Output, optional ...CumprodAttr)

Source from the content-addressed store, hash-verified

22183// axis: A `Tensor` of type `int32` (default: 0). Must be in the range
22184// `[-rank(x), rank(x))`.
22185func Cumprod(scope *Scope, x tf.Output, axis tf.Output, optional ...CumprodAttr) (out tf.Output) {
22186 if scope.Err() != nil {
22187 return
22188 }
22189 attrs := map[string]interface{}{}
22190 for _, a := range optional {
22191 a(attrs)
22192 }
22193 opspec := tf.OpSpec{
22194 Type: "Cumprod",
22195 Input: []tf.Input{
22196 x, axis,
22197 },
22198 Attrs: attrs,
22199 }
22200 op := scope.AddOperation(opspec)
22201 return op.Output(0)
22202}
22203
22204// Generate a glob pattern matching all sharded file names.
22205func ShardedFilespec(scope *Scope, basename tf.Output, num_shards tf.Output) (filename tf.Output) {

Callers 1

ProdGradFunction · 0.85

Calls 4

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

Tested by

no test coverage detected