自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 问答 (2)
  • 收藏
  • 关注

原创 tensorflow 图像色彩亮度操作小结

1.def distort_color(image, color_ordering=0, fast_mode=True, scope=None): """Distort the color of a Tensor image. Each color distortion is non-commutative and thus ordering of the color ops ...

2018-07-31 16:57:42 909

原创 tensorflow loss function 小结

1.tf.nn.l2_losstf.nn.l2_loss( t,name=None)L2 Loss. Computes half the L2 norm of a tensor without the sqrt:output = sum(t ** 2) / 2Args:t: A Tensor. Must be one of the following types: half,...

2018-07-29 13:29:21 498

转载 Tensorflow 读取TFRecord 文件小结

1.Tensorflow学习笔记-通过slim读取TFRecord文件 TFRecord文件格式的介绍:http://blog.csdn.net/lovelyaiq/article/details/78711944   由于slim是tensorflow的高级API,使用起来比较方便,例如在卷积或全连接层的书写时,可以大大减少代码量。使用slim读取TFRecord文件与tensorfl...

2018-07-29 10:54:11 1247

转载 tf.estimator 小结

1.tf.estimator.EstimatorSpec源码分析tf.estimator.EstimatorSpec是python新增的一个高级api,它定义了一个具体的模型对象,现根据源代码简要分析其功能。ModeKeys类源代码如下:class ModeKeys(object):TRAIN = 'train'EVAL = 'eval'PREDICT = 'infer' ...

2018-07-28 23:30:49 736

原创 tensorflow learning_rate 的设置方法小结

1. 分段式learning rate的设置方式其中tf.app.flags.DEFINE_float('learning_rate', 1e-3, 'Initial learning rate.')tf.app.flags.DEFINE_float('end_learning_rate', 0.000001, 'The minima...

2018-07-28 23:21:06 3616

转载 tensorflow 参数初始化(initializer)

CNN中最重要的就是参数了,包括W,b。 我们训练CNN的最终目的就是得到最好的参数,使得目标函数取得最小值。参数的初始化也同样重要,因此微调受到很多人的重视,那么tf提供了哪些初始化参数的方法呢,我们能不能自己进行初始化呢?所有的初始化方法都定义在tensorflow/python/ops/init_ops.py1、tf.constant_initializer()也可以简写为tf....

2018-07-28 20:22:22 3967

原创 tensorflow 计算运算设备的GPU或者CPU的数量

tensorflow 计算运算设备的GPU数量的程序if FLAGS.multi_gpu: from tensorflow.python.client import device_lib local_device_protos = device_lib.list_local_devices() num_gpus = sum([1 for d in local_dev...

2018-07-28 18:21:07 2433

原创 third_softmax = tf.nn.softmax(third_sorted_unlabeled_logits)

该函数与下面的编程等价:third_sorted_unlabeled_exp_logits = tf.exp(third_sorted_unlabeled_logits)logits_sum = tf.reduce_sum(tf.exp(third_sorted_unlabeled_logits), axis=1)logits_sum1 = tf.expand_dims(logits_s...

2018-07-19 20:46:55 125

转载 获取动静态张量的shape

def combined_static_and_dynamic_shape(tensor): """Returns a list containing static and dynamic values for the dimensions. Returns a list of static and dynamic values for shape dimensions. This i...

2018-07-04 11:39:03 495

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除