Python - tensorflow.IndexedSlices.values Attribute Last Updated : 28 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. values is used to get the values of the slice. Syntax: tensorflow.IndexedSlices.values Returns: It returns a Tensor containing the values of the slice. Example 1: Python3 # Importing the library import tensorflow as tf # Initializing the input data = tf.constant([[1, 2, 3], [4, 5, 6]]) # Printing the input print('data: ', data) # Calculating result res = tf.IndexedSlices(data, [1]) # Finding values values = res.values # Printing the result print('Values: ', values) Output: data: tf.Tensor( [[1 2 3] [4 5 6]], shape=(2, 3), dtype=int32) Values: tf.Tensor( [[1 2 3] [4 5 6]], shape=(2, 3), dtype=int32) Example 2: Python3 # Importing the library import tensorflow as tf # Initializing the input data = tf.constant([1, 2, 3]) # Printing the input print('data: ', data) # Calculating result res = tf.IndexedSlices(data, [1]) # Finding values values = res.values # Printing the result print('Values: ', values) Output: data: tf.Tensor([1 2 3], shape=(3, ), dtype=int32) Values: tf.Tensor([1 2 3], shape=(3, ), dtype=int32) Comment More infoAdvertise with us Next Article Python - tensorflow.IndexedSlices.op Attribute A aman neekhara Follow Improve Article Tags : Python Python-Tensorflow Python Tensorflow-math-functions Practice Tags : python Similar Reads Python - tensorflow.IndexedSlices.op Attribute TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. op is used to find the operation used to that produces value as an output. It only works when eager execution is disabled. Syntax: tensorflow.IndexedSlices.op Returns: I 2 min read Python - tensorflow.IndexedSlices.dtype Attribute TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. dtype is used to find the type of values in Tensor. Syntax: tensorflow.IndexedSlices.dtype Returns: It returns the dtype of elements in the tensor. Example 1: Python3 # 1 min read Python - tensorflow.IndexedSlices.shape Attribute TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. shape is used to get the tensorflow.TensorShape representing the shape of the dense tensor. Syntax:  tensorflow.IndexedSlices.shape Returns:  It returns tensorflow.Tenso 1 min read Python - tensorflow.IndexedSlices.graph Attribute TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. graph is used to find the  Graph that contains the values, indices, and shape tensors. Syntax: tensorflow.IndexedSlices.graph Return: It returns a Graph instance. Examp 1 min read Python - tensorflow.IndexedSlices.indices Attribute TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. indices is used to find the indices of the slice. Syntax: tensorflow.IndexedSlices.indices Returns: It returns a 1-D Tensor containing the indices of slice. Example 1: P 1 min read Python - tensorflow.IndexedSlices.device Attribute TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. device is used to find the name of the device on which values will be generated. Syntax: tensorflow.IndexedSlices.device Returns: It returns the name of the device. Exam 1 min read Like