Friday, November 13
Trending
- Microsoft 365 Outage: Outlook, Teams and Copilot Down. What We Know
- Diwali Online Shopping Scams 2026: 10 Ways to Stay Safe
- 10 Best DDoS Protection Services for 2027
- 12 Best Web Application Firewalls (WAF) for 2027
- Best Ethical Hacking Tools in 2027: Free & Paid Picks
- Software supply chain attacks 2026: Timeline and developer checklist
- Binance Hack: $6.3 Billion Drained in the Largest Crypto Theft Ever. What We Know So Far
- This Site Uses XSLT Chrome Warning Explained: How to Fix It
Following are some mathematical functions that are useful for manupilating the tensor
- tensorflow.add(a, b)
- tensorflow.substract(a, b)
- tensorflow.multiply(a, b)
- tensorflow.div(a, b)
- tensorflow.pow(a, b)
- tensorflow.exp(a)
- tensorflow.sqrt(a)
import tensorflow as tf x = tf.constant([2.0], dtype = tf.float32) tensor_a = tf.constant([[1,2]], dtype = tf.int32) tensor_b = tf.constant([[3, 4]], dtype = tf.int32) #Sqaure Root print(tf.sqrt(x)) #Exponential print(tf.exp(x)) #Power print(tf.pow(x,x)) #Add tensor_add = tf.add(tensor_a, tensor_b) print(tensor_add) #Substarct tensor_sub = tf.subtract(tensor_a, tensor_b) print(tensor_sub) #Multiply tensor_mul = tf.multiply(tensor_a, tensor_b) print(tensor_mul) #Divide tensor_div = tf.div(tensor_a, tensor_b) print(tensor_div)
The above code demonstrates the use of all the above-mentioned TensorFlow function0.



