博客
关于我
深度学习TF—2.TensorFlow2高阶操作
阅读量:245 次
发布时间:2019-03-01

本文共 1569 字,大约阅读时间需要 5 分钟。

TensorFlow????

???????

1. tf.concat: ??????????

concat????????????????????????????????

2. tf.stack: ???????

tf.stack????????????????????????????

3. tf.unstack: ?????

unstack?????????????????????????????????????

4. tf.split: ???????

split????????????????????????????


????????

1. tf.norm: ????

?????????????????

2. tf.reduce_max/min/mean/sum: ?????????????

??????????????????

3. tf.argmax/argmin: ????????????

????????????????

4. tf.equal: ????

??????????????????????

5. tf.unique: ????????

??????????


??????

1. tf.sort/tf.argsort: ?????

sort??????????argsort???????????

2. tf.math.top_k: ???????k?

?????k???????????


???????

1. tf.pad: ????

pad???????????????????????????

2. tf.tile: ????

?????????????????


???????

1. tf.clip_by_value: ???????

???????????????

2. tf.clip_by_norm: ????????

??????????????

3. tf.nn.relu: ReLU????

????????????

4. tf.clip_by_global_norm: ??????

?????????????????


??????

1. tf.where: ??????

????????????????

2. tf.scatter_nd: ????????

??????????????

3. tf.meshgrid: ?????

?????????????????


??

1. tf.meshgrid ??

import tensorflow as tfimport matplotlib.pyplot as pltdef fun(x):    z = tf.math.sin(x[...,0]) + tf.math.sin(x[...,1])    return zx = tf.linspace(0., 2*3.14, 500)y = tf.linspace(0., 2*3.14, 500)point_x, point_y = tf.meshgrid(x, y)points = tf.stack([point_x, point_y], axis=2)print(points.shape)z = fun(points)plt.figure('plot 2d func value')plt.imshow(z, origin='lower', interpolation='none')plt.colorbar()plt.figure('plot 2d func contour')plt.contour(point_x, point_y, z)plt.colorbar()plt.show()

??????????????????????????????????

转载地址:http://uzsv.baihongyu.com/

你可能感兴趣的文章
Objective-C实现图像移动(附完整源码)
查看>>
Objective-C实现图层混合算法(附完整源码)
查看>>
Objective-C实现图片dilation operation扩张操作算法(附完整源码)
查看>>
Objective-C实现图片erosion operation侵蚀操作算法(附完整源码)
查看>>
Objective-C实现图片的放大缩小(附完整源码)
查看>>
Objective-C实现图片腐蚀(附完整源码)
查看>>
Objective-C实现图片膨胀(附完整源码)
查看>>
Objective-C实现图的邻接矩阵(附完整源码)
查看>>
Objective-C实现圆球的表面积和体积(附完整源码)
查看>>
Objective-C实现在Regex的帮助下检查字谜算法(附完整源码)
查看>>
Objective-C实现在指定区间 [a, b] 中找到函数的实根,其中 f(a)*f(b) < 0算法(附完整源码)
查看>>
Objective-C实现均值滤波(附完整源码)
查看>>
Objective-C实现埃拉托斯特尼筛法算法(附完整源码)
查看>>
Objective-C实现域名解析(附完整源码)
查看>>
Objective-C实现域名转IP(附完整源码)
查看>>
Objective-C实现培根密码算法(附完整源码)
查看>>
Objective-C实现基于 LIFO的堆栈算法(附完整源码)
查看>>
Objective-C实现基于 LinkedList 的添加两个数字的解决方案算法(附完整源码)
查看>>
Objective-C实现基于opencv的抖动算法(附完整源码)
查看>>
Objective-C实现基于事件对象实现线程同步(附完整源码)
查看>>