TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning neural networks. ndtri() is used to find quantile of Standard Normal.
Syntax: tf.math.ndtri(x, name)
Parameter:
- x: It’s the input tensor. Allowed dtype for this tensor are float or double..
- name(optional): It defines the name for the operation.
Returns: It returns Inverse error function of x.
Example 1:
Python3
# Importing the library import tensorflow as tf # Initializing the input tensor a = tf.constant([. 2 , . 5 , . 7 , 1 ], dtype = tf.float64) # Printing the input tensor print ( 'Input: ' , a) # Calculating result res = tf.math.ndtri(x = a) # Printing the result print ( 'Result: ' , res) |
Output:
Input: tf.Tensor([0.2 0.5 0.7 1. ], shape=(4, ), dtype=float64) Result: tf.Tensor([-0.84162123 0. 0.52440051 inf], shape=(4, ), dtype=float64)
Example 2:
Python3
# importing the library import tensorflow as tf # Initializing the input tensor a = tf.constant([ - . 1 , - . 2 , - . 5 , . 5 , . 2 , . 1 ], dtype = tf.float64) # Printing the input tensor print ( 'Input: ' , a) # Calculating result res = tf.math.ndtri(x = a) # Printing the result print ( 'Result: ' , res) |
Output:
Input: tf.Tensor([-0.1 -0.2 -0.5 0.5 0.2 0.1], shape=(6, ), dtype=float64) Result: tf.Tensor([ -inf -inf -inf 0. -0.84162123 -1.28155157], shape=(6, ), dtype=float64)