TensorFlow
文章平均质量分 73
Luchang-Li
这个作者很懒,什么都没留下…
展开
-
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 · 1966 阅读 · 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 · 568 阅读 · 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 · 434 阅读 · 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 · 476 阅读 · 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 · 2009 阅读 · 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 · 2327 阅读 · 0 评论