- TensorFlow 2.0 Quick Start Guide
- Tony Holdroyd
- 47字
- 2021-06-24 16:02:03
Declaring TensorFlow constants
TensorFlow constants may be declared as in the following example:
m_o_l = tf.constant(42)
m_o_l
# <tf.Tensor: id=45, shape=(), dtype=int32, numpy=42>
m_o_l.numpy()
# 42
Again, TensorFlow will infer the datatype, or it can be explicitly specified, as is the case with variables:
unit = tf.constant(1, dtype = tf.int64)
unit
# <tf.Tensor: id=48, shape=(), dtype=int64, numpy=1>
推薦閱讀
- 自動控制工程設計入門
- 影視后期制作(Avid Media Composer 5.0)
- 計算機控制技術
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- 四向穿梭式自動化密集倉儲系統的設計與控制
- Excel 2007技巧大全
- 走近大數據
- Web璀璨:Silverlight應用技術完全指南
- 電氣控制及Micro800 PLC程序設計
- Apache Spark Quick Start Guide
- RealFlow流體制作經典實例解析
- 精通ROS機器人編程(原書第2版)
- 單片機原理、接口及應用系統設計
- Arduino創意機器人入門:基于Mixly
- 華人動畫師的法蘭西印象