Watch keynotes, product sessions, workshops, and more from Google I/O

# tf.math.sqrt

Computes element-wise square root of the input tensor.

### Used in the notebooks

````x = tf.constant([[4.0], [16.0]])`
`tf.sqrt(x)`
`<tf.Tensor: shape=(2, 1), dtype=float32, numpy=`
`  array([[2.],`
`         [4.]], dtype=float32)>`
`y = tf.constant([[-4.0], [16.0]])`
`tf.sqrt(y)`
`<tf.Tensor: shape=(2, 1), dtype=float32, numpy=`
`  array([[nan],`
`         [ 4.]], dtype=float32)>`
`z = tf.constant([[-1.0], [16.0]], dtype=tf.complex128)`
`tf.sqrt(z)`
`<tf.Tensor: shape=(2, 1), dtype=complex128, numpy=`
`  array([[0.0+1.j],`
`         [4.0+0.j]])>`
```

`x` A `tf.Tensor` of type `bfloat16`, `half`, `float32`, `float64`, `complex64`, `complex128`
`name` A name for the operation (optional).

A `tf.Tensor` of same size, type and sparsity as `x`.

If `x` is a `SparseTensor`, returns `SparseTensor(x.indices, tf.math.sqrt(x.values, ...), x.dense_shape)`

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"没有我需要的信息" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"太复杂/步骤太多" },{ "type": "thumb-down", "id": "outOfDate", "label":"内容需要更新" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"其他" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"易于理解" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"解决了我的问题" },{ "type": "thumb-up", "id": "otherUp", "label":"其他" }]