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

Function pow

tensorflow/python/ops/math_ops.py:436–459  ·  view source on GitHub ↗

r"""Computes the power of one value to another. Given a tensor `x` and a tensor `y`, this operation computes \\(x^y\\) for corresponding elements in `x` and `y`. For example: ```python x = tf.constant([[2, 2], [3, 3]]) y = tf.constant([[8, 16], [2, 3]]) tf.pow(x, y) # [[256, 65536], [

(x, y, name=None)

Source from the content-addressed store, hash-verified

434@tf_export("math.pow", "pow")
435@dispatch.add_dispatch_support
436def pow(x, y, name=None): # pylint: disable=redefined-builtin
437 r"""Computes the power of one value to another.
438
439 Given a tensor `x` and a tensor `y`, this operation computes \\(x^y\\) for
440 corresponding elements in `x` and `y`. For example:
441
442 ```python
443 x = tf.constant([[2, 2], [3, 3]])
444 y = tf.constant([[8, 16], [2, 3]])
445 tf.pow(x, y) # [[256, 65536], [9, 27]]
446 ```
447
448 Args:
449 x: A `Tensor` of type `float16`, `float32`, `float64`, `int32`, `int64`,
450 `complex64`, or `complex128`.
451 y: A `Tensor` of type `float16`, `float32`, `float64`, `int32`, `int64`,
452 `complex64`, or `complex128`.
453 name: A name for the operation (optional).
454
455 Returns:
456 A `Tensor`.
457 """
458 with ops.name_scope(name, "Pow", [x]) as name:
459 return gen_math_ops._pow(x, y, name=name)
460
461
462# pylint: disable=redefined-builtin,redefined-outer-name

Callers 15

testOperatorOverrideMethod · 0.50
__pow__Method · 0.50
__rpow__Method · 0.50
__pow__Method · 0.50
__rpow__Method · 0.50
CalculateTrueResultsFunction · 0.50
TryOneUniformLogSoftmaxFunction · 0.50
TryOneUniformSoftmaxFunction · 0.50
TryOneUniformSoftmaxInt8Function · 0.50
TryOneSkyscraperSoftmaxFunction · 0.50

Calls 1

name_scopeMethod · 0.45

Tested by 8

testOperatorOverrideMethod · 0.40
CalculateTrueResultsFunction · 0.40
TryOneUniformLogSoftmaxFunction · 0.40
TryOneUniformSoftmaxFunction · 0.40
TryOneUniformSoftmaxInt8Function · 0.40
TryOneSkyscraperSoftmaxFunction · 0.40
AgreeFunction · 0.40