
tensorflow函数
文章平均质量分 62
永兴呵呵哒
谁知道明天和意外,哪一个先来呢
展开
-
tf.get_variable()、tf.Variable、
tf.get_variable()tf.get_variable(name, shape, initializer): name就是变量的名称,shape是变量的维度,initializer是变量初始化的方式。注意:不同的变量之间不能有相同的名字,除非你定义了variable_scope,这样才可以有相同的名字。初始化的方式有以下几种:tf.constant_initializer:常量...原创 2018-11-20 15:17:49 · 236 阅读 · 0 评论 -
TensorFlow四种分类损失函数
参考文章:https://www.jianshu.com/p/75f7e60dae95tf.nn.sigmoid_cross_entropy_with_logits( _sentinel=None, labels=None, logits=None, name=None)tf.nn.weighted_cross_entropy_with_logits( ...原创 2019-06-15 11:42:48 · 5032 阅读 · 0 评论 -
数组分片
tiou_thresholds=np.linspace(0.5, 0.95, 10)print tiou_thresholdsprint '----------------'for idx, tiou in enumerate(tiou_thresholds[::]): print idx print tiouprint '----------------'for idx...原创 2018-11-26 09:45:49 · 536 阅读 · 0 评论 -
matplotlib相关学习
colors = [‘k’, ‘r’, ‘yellow’, ‘b’, ‘c’, ‘m’, ‘b’, ‘pink’, ‘lawngreen’, ‘indigo’]原创 2018-11-26 09:27:05 · 667 阅读 · 0 评论 -
TensorFlow常用函数与基本概念
1、tensorflow的基本运作为了快速的熟悉TensorFlow编程,下面从一段简单的代码开始:import tensorflow as tf #定义‘符号’变量,也称为占位符 a = tf.placeholder("float") b = tf.placeholder("float") y = tf.mul(转载 2018-11-19 17:08:09 · 228 阅读 · 0 评论 -
tf.cast()的用法
cast( x, dtype, name=None)将x的数据格式转化成dtype.例如,原来x的数据格式是bool, 那么将其转化成float以后,就能够将其转化成0和1的序列。反之也可以。a = tf.Variable([1,0,0,1,1])b = tf.cast(a,dtype=tf.bool)sess=tf.InteractiveSession()...原创 2018-11-20 11:33:30 · 211 阅读 · 0 评论 -
tf.reduce_sum()
官方文档:原创 2018-11-20 11:50:42 · 140 阅读 · 0 评论 -
iteritems() python22
看函数名是迭代输出字典的键值对。for k,v in dict.iteritems():print k,vdata = {'a':23,'b':32,'c':34}for m , n in data.iteritems(): print m print n结果:a23c34b32...原创 2018-11-23 10:29:13 · 256 阅读 · 0 评论 -
sort_values()——
含义:pandas中的sort_values()函数,可以将数据集依照某个字段中的数据进行排序,该函数即可根据指定列数据也可根据指定行的数据排序。sort_values()函数的具体参数DataFrame.sort_values(by, axis=0, ascending=True, inplace=False, kind=‘quicksort’, na_position=‘last’)...原创 2018-11-21 19:27:17 · 30233 阅读 · 0 评论 -
tf.reshape()与tf.nn.l2_loss()
原创 2018-11-21 09:50:08 · 281 阅读 · 0 评论 -
tf.name_scope与tf.variable_scope
参考文章:https://blog.youkuaiyun.com/Jerr__y/article/details/70809528参考文章:https://blog.youkuaiyun.com/u012436149/article/details/53696970原创 2018-11-20 19:09:07 · 125 阅读 · 0 评论 -
COCO数据集物体类别id
coco里面的id和类名字对应:总共80类,但id号到90coco_id_name_map={1: 'person', 2: 'bicycle', 3: 'car', 4: 'motorcycle', 5: 'airplane', 6: 'bus', 7: 'train', 8: 'truck', 9: 'boat', 10: 'traffic light'...原创 2019-07-09 14:52:00 · 11643 阅读 · 5 评论