tf.where 实例2
来源:互联网 发布:大数据分析平台有哪些 编辑:程序博客网 时间:2024/05/24 00:57
找两个等长的数组的相同值的index
import tensorflow as tfa = tf.constant([1,2,3,4,5])b = tf.constant([1,0,3,0,5])c = tf.where(tf.equal(a,b))print(a.get_shape())print(b.get_shape())print(c.get_shape())sess = tf.Session()print(sess.run(c))
print结果
[[0]
[2]
[4]]
阅读全文
0 0
- tf.where 实例2
- tf.where 实例
- tf.where()函数
- tf.where 和 tf.cond对比
- tf.where(a,b,c)函数
- tf.nn.conv2d 实例
- tf.nn.max_pool 实例
- tf.select 实例
- tf.nn.atrous_conv2d 实例
- tf.gather 实例
- tf.strided_slice 实例
- tensorflow tf.tile 实例
- tf.one_hot 实例
- tensorflow tf.stack tf.unstack 实例
- tensorflow tf.split 和 tf.unstack 实例
- tf.segment_sum和tf.unsorted_segment_sum实例
- tensorflow tf.layers.dense 实例
- [译]TF-api(2) tf.nn.lrn
- QT绘图系统
- show create table ‘tablename’
- 空指针引发的灾难——一下午debug
- Java 并发 --- 阻塞队列之LinkedBlockingDeque源码分析
- SpringBoot中WebSocket不能实现注入的问题
- tf.where 实例2
- 廖雪峰 Python教程 笔记
- 主动学习 active learning(简单例子)
- ios上架 CFBundleExecutable 错误
- maven各版本后缀的介绍
- GreenDao3.0入门
- matlab技巧整理
- django 时区问题
- DCGAN+keras生成mnist