- TensorFlow Machine Learning Projects
- Ankit Jain Armando Fandango Amita Kapoor
- 154字
- 2021-06-10 19:15:27
Operations
The TensorFlow library contains several built-in operations that can be applied on tensors. An operation node can be defined by passing input values and saving the output in another tensor. To understand this better, let's define two operations, op1 and op2:
op1 = tf.add(const2, const3)
op2 = tf.multiply(const2, const3)
Let's print op1 and op2:
print('op1 : ', op1)
print('op2 : ', op2)
The output is as follows, and shows that op1 and op2 are defined as tensors:
To print the output from executing these operations, the op1 and op2 tensors have to be executed in a TensorFlow session:
print('run(op1) : ', tfs.run(op1))
print('run(op2) : ', tfs.run(op2))
The output is as follows:
run(op1) : 91.0 run(op2) : 1888.0
Some of the built-in operations of TensorFlow include arithmetic operations, math functions, and complex number operations.
推薦閱讀
- JavaScript實(shí)例自學(xué)手冊
- OpenStack for Architects
- 極簡AI入門:一本書讀懂人工智能思維與應(yīng)用
- Windows XP中文版應(yīng)用基礎(chǔ)
- Creo Parametric 1.0中文版從入門到精通
- 大數(shù)據(jù)處理平臺
- 變頻器、軟啟動器及PLC實(shí)用技術(shù)260問
- OpenStack Cloud Computing Cookbook
- 網(wǎng)站前臺設(shè)計(jì)綜合實(shí)訓(xùn)
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)學(xué)習(xí)指導(dǎo)與練習(xí)(Windows XP+Office 2003)
- 渲染王3ds Max三維特效動畫技術(shù)
- Hands-On Agile Software Development with JIRA
- MySQL Management and Administration with Navicat
- 傳感技術(shù)基礎(chǔ)與技能實(shí)訓(xùn)
- 超好玩的Python少兒編程