tf.keras.ops.deg2rad
Stay organized with collections
Save and categorize content based on your preferences.
Convert angles from degrees to radians.
tf.keras.ops.deg2rad(
x
)
The conversion is defined as:
rad = deg * (π / 180)
Args |
x
|
Input tensor of angles in degrees.
|
Returns |
|
A tensor containing angles converted to radians.
|
Examples:
from keras import ops
ops.deg2rad(180.0)
3.141592653589793
ops.deg2rad([0.0, 90.0, 180.0])
array([0., 1.57079633, 3.14159265])
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. Some content is licensed under the numpy license.
Last updated 2026-10-31 UTC.
[null,null,["Last updated 2026-10-31 UTC."],[],[]]