
TensorFlow
文章平均质量分 73
Luchang-Li
为什么要博客呢?一是为了记录学习,在写作中增强对知识认知深度,二是为了传播知识本身。
正如自动驾驶的不同层级一样,一个人对知识的掌握也分为了很多层级,比如我认为:
L0:对一个东西没有任何认知。
L1:大致了解基本概念,能够使用,但不知道内部深层次的原理,没法表达清楚。
L2: 基本知道内部的原理,能够比较流畅地表达出来。但能够书面表达往往不意味着能够口头表达,比如能写出PPT,但是不意味着能讲好PPT。
L3:能够流畅地,深入浅出地口头表达,能够准确地回答别人的问题和质疑。
所以可见,表达(不管是博客这种书面还是口头表达)是能够加深你对知识的架构化认知,表达地清晰与否也直接证明了你的认知深度
展开
-
TensorFlow不重新编译源码使用C/C++ API推理
E tensorflow/core/common_runtime/session.cc:67] Not found: No session factory registered for the given session options: {target: "" config: } Registered factories are {}.create new session failed原创 2021-12-30 16:58:37 · 2361 阅读 · 0 评论 -
TensorFlow C++接口推理
下载TF代码,配置tfgit clone -b v1.14.0 https://github.com/tensorflow/tensorflow.gitcd tensorflow./configure # 配置tf编译选项编译tf so,ABI根据实际需要配置bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=opt //tensorflow:libtensorflow_cc.sobazel build --cxxopt原创 2021-10-26 21:10:40 · 636 阅读 · 0 评论 -
TensorFlow wide and deep模型保存和推理
保存saved model# infer input shapes and types from feature_columns as a parse_example_specparse_example_spec = tf.feature_column.make_parse_example_spec(deep_columns + wide_columns)print("parse_example_spec:", parse_example_spec)# expose serialized .原创 2021-10-11 22:00:33 · 487 阅读 · 2 评论 -
TensorFlow c++ dump graph to pbtxt
https://github.com/tensorflow/ngraph-bridgengraph-bridge-0.22.0-rc4\logging\tf_graph_writer.*#include <fstream>#include <iomanip>#include <iostream>#include <sstream>#include "tensorflow/core/framework/attr_value_util.h"#i原创 2020-10-22 17:04:33 · 520 阅读 · 0 评论 -
tensorflow bazel编译问题
TensorFlow bazel版本判断:TensorFlow下载目录的configure.py里面有_TF_MIN_BAZEL_VERSION,_TF_MAX_BAZEL_VERSION安装方法:在bazel github下载对应版本的bazel-2.0.0-installer-linux-x86_64.sh,然后./bazel-2.0.0-installer-linux-x86_64.sh --userPKIX path building failed: sun.secu....原创 2020-10-19 16:58:23 · 2390 阅读 · 2 评论 -
TensorFlow查看pb模型节点信息
example:import tensorflow as tfimport os model_dir = './'model_name = 'ocr.pb'def create_graph(): with tf.gfile.FastGFile(os.path.join( model_dir, model_name), 'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFromS.原创 2020-08-22 18:26:57 · 2486 阅读 · 0 评论