博客
关于我
深度学习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实现reverse letters反向字母算法(附完整源码)
查看>>
Objective-C实现ripple adder涟波加法器算法(附完整源码)
查看>>
Objective-C实现RodCutting棒材切割最大利润算法(附完整源码)
查看>>
Objective-C实现Romberg算法(附完整源码)
查看>>
Objective-C实现round robin循环赛算法(附完整源码)
查看>>
Objective-C实现RRT路径搜索(附完整源码)
查看>>
Objective-C实现rsa 密钥生成器算法(附完整源码)
查看>>
Objective-C实现RSA密码算法(附完整源码)
查看>>
Objective-C实现runge kutta龙格-库塔法算法(附完整源码)
查看>>
Objective-C实现segment tree段树算法(附完整源码)
查看>>
Objective-C实现selection sort选择排序算法(附完整源码)
查看>>
Objective-C实现sha256算法(附完整源码)
查看>>
Objective-C实现shell sort希尔排序算法(附完整源码)
查看>>
Objective-C实现SinglyLinkedList单链表算法(附完整源码)
查看>>
Objective-C实现skew heap倾斜堆算法(附完整源码)
查看>>
Objective-C实现Skip List跳表算法(附完整源码)
查看>>
Objective-C实现slack message松弛消息算法(附完整源码)
查看>>
Objective-C实现slow sort慢排序算法(附完整源码)
查看>>
Objective-C实现tanh函数功能(附完整源码)
查看>>
Objective-C实现z-algorithm算法(附完整源码)
查看>>