博客
关于我
深度学习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实现max_heap最大堆算法(附完整源码)
查看>>
Objective-C实现md5算法(附完整源码)
查看>>
Objective-C实现memoization优化技术算法(附完整源码)
查看>>
Objective-C实现memset函数功能(附完整源码)
查看>>
Objective-C实现merge insertion sort合并插入排序算法(附完整源码)
查看>>
Objective-C实现merge sort归并排序算法(附完整源码)
查看>>
Objective-C实现mergesort归并排序算法(附完整源码)
查看>>
Objective-C实现miller rabin米勒-拉宾素性检验算法(附完整源码)
查看>>
Objective-C实现Miller-Rabin素性测试程序(附完整源码)
查看>>
Objective-C实现Miller-Rabin素性测试程序(附完整源码)
查看>>
Objective-C实现MinhashLSH算法(附完整源码)
查看>>
Objective-C实现MinHeap最小堆算法(附完整源码)
查看>>
Objective-C实现multilayer perceptron classifier多层感知器分类器算法(附完整源码)
查看>>
Objective-C实现n body simulationn体模拟算法(附完整源码)
查看>>
Objective-C实现naive string search字符串搜索算法(附完整源码)
查看>>
Objective-C实现natural sort自然排序算法(附完整源码)
查看>>
Objective-C实现nested brackets嵌套括号算法(附完整源码)
查看>>
Objective-C实现nevilles method多项式插值算法(附完整源码)
查看>>
Objective-C实现newtons second law of motion牛顿第二运动定律算法(附完整源码)
查看>>
Objective-C实现newton_raphson牛顿拉夫森算法(附完整源码)
查看>>