- 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.
推薦閱讀
- 樂高機(jī)器人EV3設(shè)計指南:創(chuàng)造者的搭建邏輯
- Getting Started with MariaDB
- Mastering Salesforce CRM Administration
- 精通Excel VBA
- 機(jī)器學(xué)習(xí)流水線實(shí)戰(zhàn)
- 四向穿梭式自動化密集倉儲系統(tǒng)的設(shè)計與控制
- Implementing Oracle API Platform Cloud Service
- Mastering ServiceNow Scripting
- 走近大數(shù)據(jù)
- 軟件構(gòu)件技術(shù)
- C++程序設(shè)計基礎(chǔ)(上)
- 三菱FX/Q系列PLC工程實(shí)例詳解
- 大數(shù)據(jù):引爆新的價值點(diǎn)
- 算法設(shè)計與分析
- JSP網(wǎng)絡(luò)開發(fā)入門與實(shí)踐