tensorflow
沙河边の搬砖工
沙河边的搬砖工
展开
-
tensorflow名称域name_scope(),variable_scope(),与tf.Variable(),tf.get_variable()
tensorflow的名称域的声明有两种方式: 1)tf.name_scope("scope_name"): 2)tf.variable_scope("scope_name"): 定义变量有两种方式: 1)tf.Variable()#变量名可选 2)tf.get_variable()#变量名必选 在variable_scope名称域中定义变量,则两种变量定义都是一样的 在name_s...原创 2019-12-15 03:29:37 · 236 阅读 · 0 评论 -
Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.
在公司Linux服务器上执行tf.import_graph_def(graph_def, name='graph')导入训练好的图时,报了个错误: ValueError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> y:DstT; attr=SrcT:ty pe; ...原创 2018-11-02 15:36:06 · 7666 阅读 · 1 评论 -
对CNN网络的计算流程的简单梳理
一、对多分类函数tf.nn.softmax()与交叉熵函数tf.nn.softmax_cross_entropy_with_logits()的认识 这俩函数看着就有关系,前缀都是tf.nn.softmax,那么各自的作用是什么呢? 首先看这俩函数的参数,前者是logits,后者也有个logits,区别是后者多了个labels参数,其中logits参数是输出层的...原创 2018-11-14 10:55:24 · 821 阅读 · 0 评论 -
inception v3模型经过迁移学习后移植到移动端的填坑经历
先混乱的记录下 1、在将迁移后的pb文件转换为lite文件时报错, 使用 graph.get_operations()查看tensor,Tensor("DecodeJpeg/contents:0", shape=(), dtype=string),原来使用TensorFlow中提供的图像读取函数tf.image.decode_jpeg()得到的是原始...原创 2018-11-12 14:26:23 · 1345 阅读 · 4 评论 -
对TensorFlow中图概念的简单整理
TensorFlow中是先建图,再执行计算,那么默认图与导入的图、指定默认图之间是个什么样的关系呢?写段代码测试下 从上边代码执行结果来看,create_graph()创建的图与main()中的默认图是不一样的,结论一:如果session会话中没有指定图参数,那么系统会将自动维护一个默认图,如果修改tf.Session(graph = c),把第三个p...原创 2018-11-14 17:59:41 · 853 阅读 · 0 评论