什么是张量流

2023-11-09

An end-to-end open-source platform for Machine Learning

端到端的机器学习开源平台

Before we start with TensorFlow, we will need to know what machine learning and deep learning technologies are. Machine Learning is an application of Artificial Intelligence which provides automation to systems where Machine or System can learn on its own and It may improve based on previous experience and it can be done without external programming. Deep Learning is the next part of machine learning. Which more focuses on algorithms that are inspired by the structure and functioning of the human brain. Deep learning models sometimes achieve higher accuracies because it uses neural networks to perform tasks. This is where we use TensorFlow because it largely deals with deep neural networks.

在开始使用TensorFlow之前,我们需要了解什么是机器学习和深度学习技术。 机器学习是人工智能的一种应用,它为机器或系统可以自行学习的系统提供自动化,并且可以根据以前的经验进行改进,并且无需外部编程即可完成。 深度学习是机器学习的下一部分。 其中更侧重于受人脑结构和功能启发的算法。 深度学习模型有时会获得更高的准确性,因为它使用神经网络来执行任务。 这是我们使用TensorFlow的地方,因为它主要处理深度神经网络。

TensorFlow

TensorFlow

Tensorflow is an open-source library developed by Google and nowadays it has become a more powerful tool to run complex computations. Deep learning has two libraries named Keras and PyTorch which are now replaced by TensorFlow.Because TensorFlow has faster compilation time than these libraries. In reality, Tensorflow performs a huge amount of computations it deals with a higher amount of data such as images. It accepts data in multidimensional arrays called “Tensors”. Tensorflow handles data in the form of graphs by creating neural networks whenever there is a necessity. It also facilitates APIs (Application programming interfaces that are used for connecting different codes or applications)for machine learning. once accessing of data is done then there is no stopping TensorFlow automatically takes care of the rest of the things from creating a required neural network, parsing required data. In Tf computation in each iteration represented by the data flow graph because it does not follow the traditional programming approach.TensorFlow works fine on both CPU and GPU(capability to do higher computations and it contains higher power than CPU)computing devices. So using TensorFlow makes life easier.

Tensorflow是Google开发的开源库,如今它已成为运行复杂计算的更强大的工具。 深度学习有两个名为Keras和PyTorch的库,现在被TensorFlow取代了,因为TensorFlow的编译时间比这些库更快。 实际上,Tensorflow会执行大量计算,处理大量数据,例如图像。 它接受称为“张量”的多维数组中的数据 Tensorflow在必要时通过创建神经网络来处理图形形式的数据。 它还促进了用于机器学习的API(用于连接不同代码或应用程序的应用程序编程接口)。 一旦完成数据访问,便不会停止TensorFlow自动处理创建所需神经网络,解析所需数据的其余工作。 在Tf计算中,由于不遵循传统的编程方法,因此由数据流图表示的每个迭代中的TensorFlow在CPU和GPU上都可以正常工作(能够执行更高的计算能力,并且比CPU具有更高的功耗)。 因此使用TensorFlow使生活更轻松。

Installing TensorFlow

安装TensorFlow

Step 1: To install TensorFlow It is important to have python installed on your system. To check whether it is installed or not just type ”python” in the command prompt if not then install python from here.

步骤1:安装TensorFlow在系统上安装python很重要。 要检查是否已安装,只需在命令提示符下键入“ python”,然后从此处安装python

Step 2: To run TensorFlow we need some framework for that we will install Anaconda framework. You can install anaconda from here

步骤2:要运行TensorFlow,我们需要一些框架,我们将安装Anaconda框架。 您可以从这里安装anaconda

Step 3: Verify whether anaconda is installed properly or not by entering following command on command prompt

步骤3:通过在命令提示符下输入以下命令,验证anaconda是否已正确安装

C:\Users\Ultimate>conda

Step 4: Initialize the installation of TensorFlow from the following command

步骤4:通过以下命令初始化TensorFlow的安装

conda create --name tensorflow python = 3.8

Step 5: After completing environmental setup it’s essential to activate TensorFlow by typing the command in the command prompt

步骤5:完成环境设置后,必须通过在命令提示符下键入命令来激活TensorFlow

activate tensorflow

Step 6: We activated TensorFlow now use a command called pip which is generally used for executing and installing modules in python.

步骤6:我们激活了TensorFlow,现在使用名为pip的命令,该命令通常用于在python中执行和安装模块。

pip install tensorflow  &  pip install tensorflow-gpu

Step 7: Now we Successfully installed TensorFlow into our machine, So its time to run the first “Hello World” code. Follow the sequence of following commands and run them on prompt.

步骤7:现在我们已成功将TensorFlow安装到我们的机器中,因此该运行第一个“ Hello World”代码了。 遵循以下命令的顺序,并在提示时运行它们。

>> activate tensorflow
>> python (activating python shell)
>> import tensorflow as tf
>> hello = tf.constant(‘Hello, Tensorflow!’)
>> sess = tf.Session()
>> print(sess.run(hello))

Google Collab

谷歌协作

Google Collab is a real-time environment. You can run your TensorFlow codes easily through google collab. Tutorials are also available where one can learn TensorFlow with practical examples.

Google Collab是一个实时环境。 您可以通过Google collab轻松运行TensorFlow代码。 还提供了教程,供您通过实际示例学习TensorFlow。

The latest version of TensorFlow(2.0) is here. A variety of practice coding examples and multiple inbuilt datasets are available to run the Tf codes easily. To play with the neural networks here is the online playground where we can create, modify, and run our neural networks.

TensorFlow(2.0)的最新版本在这里 。 各种练习代码示例和多个内置数据集可轻松运行Tf代码。 要使用神经网络,这里是我们可以创建,修改和运行神经网络的在线游乐场。

For references and examples use following official Github repo of TensorFlow

作为参考和示例,请使用TensorFlow的官方Github回购

翻译自: https://medium.com/analytics-vidhya/what-is-tensorflow-9d09c1073b83

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

什么是张量流 的相关文章

随机推荐