目前最主流的深度框架有 TensorFlow、Pytorch 以及 Keras。其中:
TensorFlow的核心概念
张量的阶
2. 计算图:是一个有向图,又可以叫作数据流图(data flow graphs),是TensorFlow将计算表示为指令之间的依赖关系的一种表示法。它是 TensorFlow 操作对象(tf.Operation)与张量对象(tf.Tensor)的集合。操作对象是图中的节点,是图中的计算单元,张量对象是图的边,是在节点之间流动的数据。TensorFlow 的 3 种计算图,分别是:
3.会话:TensorFlow跨一个或者过个本地或远程设备运行数据流图的机制。
TensorFlow 2 中几个比较常用的 API
高效的实验分析助手-TensorBoard
参考:
1. TensorFlow 2.0的API详解:https://tensorflow.google.cn/versions/r2.0/api_docs/python/tf 2. 可视化TensorFlow运行: TensorFlow是一个采用数据流图,用于数值计算的开源框架。节点在图中表示数学操作,线则表示在节点互相联系的多维数据数组,即张量。
3.Python安装TensorFlow常见报错: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' |
|