Posts

Showing posts with the label array in tensorflow

Create array in tensorflow | Data Science tutorial | codin india

Image
 Hello! Welcome back to our tutorial. Today we will learn how to create array in tensorflow. What is tensorflow? Tensorflow is open source platform for machine learning. It has comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-art in ML and developing easily build and deploy ML powered applications.   How to import Tensorflow?    import tensorflow as tf import numpy as np  How to create array in tensorflow? We have 2 methods to create array in tensorflow:-  Using tensorflow inbuilt function Using numpy Let us understand it one by one. 1. Using Tensorflow's inbuilt function  We can create array in tensorflow using  tensorflow's inbuilt function i.e. constant arr  = tf.constant([1,2,3,4,5]) Let us understand by code:- What is constant? constant is useful for asserting that the value can be embedded that way. If the argument dtype is not specified, then the type is inferred from the type of value 2. Using Nump