博客
关于我
深度学习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实现hardy ramanujana定理算法(附完整源码)
查看>>
Objective-C实现highest response ratio next高响应比优先调度算法(附完整源码)
查看>>
Objective-C实现hill climbing爬山法用来寻找函数的最大值算法(附完整源码)
查看>>
Objective-C实现hornerMethod霍纳法算法(附完整源码)
查看>>
Objective-C实现Http Post请求(附完整源码)
查看>>
Objective-C实现Http协议下载文件(附完整源码)
查看>>
Objective-C实现IIR 滤波器算法(附完整源码)
查看>>
Objective-C实现IIR数字滤波器(附完整源码)
查看>>
Objective-C实现insertion sort插入排序算法(附完整源码)
查看>>
Objective-C实现integer partition整数分区算法(附完整源码)
查看>>
Objective-C实现integerPartition整数划分算法(附完整源码)
查看>>
Objective-C实现interpolation search插值搜索算法(附完整源码)
查看>>
Objective-C实现Interpolation search插值查找算法(附完整源码)
查看>>
Objective-C实现intersection交集算法(附完整源码)
查看>>
Objective-C实现intro sort内省排序算法(附完整源码)
查看>>
Objective-C实现inversions倒置算法(附完整源码)
查看>>
Objective-C实现isalpha函数功能(附完整源码)
查看>>
Objective-C实现islower函数功能(附完整源码)
查看>>
Objective-C实现isPowerOfTwo算法(附完整源码)
查看>>
Objective-C实现isupper函数功能(附完整源码)
查看>>