tf.math.floormod
Stay organized with collections
Save and categorize content based on your preferences.
Returns element-wise remainder of division. When x < 0
xor y < 0
is
tf.math.floormod(
x, y, name=None
)
true, this follows Python semantics in that the result here is consistent
with a flooring divide. E.g. floor(x / y) * y + mod(x, y) = x
.
Args |
x
|
A Tensor . Must be one of the following types: int32 , int64 , bfloat16 , half , float32 , float64 .
|
y
|
A Tensor . Must have the same type as x .
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor . Has the same type as x .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.math.floormod\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/math/floormod) |\n\nReturns element-wise remainder of division. When `x \u003c 0` xor `y \u003c 0` is\n\n#### View aliases\n\n\n**Main aliases**\n\n\\`tf.floormod\\`, [`tf.math.mod`](/api_docs/python/tf/math/floormod), \\`tf.mod\\`\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.floormod`](/api_docs/python/tf/math/floormod), [`tf.compat.v1.math.floormod`](/api_docs/python/tf/math/floormod), [`tf.compat.v1.math.mod`](/api_docs/python/tf/math/floormod), [`tf.compat.v1.mod`](/api_docs/python/tf/math/floormod), \\`tf.compat.v2.math.floormod\\`, \\`tf.compat.v2.math.mod\\`\n\n\u003cbr /\u003e\n\n tf.math.floormod(\n x, y, name=None\n )\n\ntrue, this follows Python semantics in that the result here is consistent\nwith a flooring divide. E.g. `floor(x / y) * y + mod(x, y) = x`.\n| **Note:** [`math.floormod`](../../tf/math/floormod) supports broadcasting. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|-------------------------------------------------------------------------------------------------------------|\n| `x` | A `Tensor`. Must be one of the following types: `int32`, `int64`, `bfloat16`, `half`, `float32`, `float64`. |\n| `y` | A `Tensor`. Must have the same type as `x`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor`. Has the same type as `x`. ||\n\n\u003cbr /\u003e"]]