136、TensorFlow的Embedding lookup
2024-10-07 11:59:42
import tensorflow as tf;
import numpy as np; c = np.random.random([10, 1])
b = tf.nn.embedding_lookup(c, [1, 3]) with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
print(sess.run(b))
下面是上面代码的输出结果:
2018-02-17 11:27:56.146080: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
[[ 0.09944958]
[ 0.0264075 ]]
最新文章
- 【C#进阶系列】29 混合线程同步构造
- 1.linux服务器的性能分析与优化
- iOS 取绝对值函数
- 在项目中引用GreenDroid库
- Spring学习笔记之Bean的一些属性设置
- 获取XML数据
- trate
- 使用strut2要注意的问题
- Linux c 内存高速访问
- IIS部署新网站
- [译]ASP.NET Core 2.0 路由引擎
- (一二三)基于GCD的dispatch_once实现单例设计
- 低版本Flume兼容高版本elasticsearch
- hMailServer安装汉化方法
- Centos7静默安装Weblogic12C
- “每日一道面试题”.Net中所有类的基类是以及包含的方法
- leetcode771
- PHP引用赋值
- tomcat catalina.out日志切割(logrotate)
- 减少存储过程封装业务逻辑-web开发与传统软件开发的思维模式不同
热门文章
- SpringBoot 参数检查 Controller中检查参数是否合法
- SpringBoot 使用maven创建springboot项目
- [Web 前端] 012 css 元素溢出
- Golang环境配置
- Python库指南
- 回溯---Permutations II
- [环境搭建]-Web Api搭建到IIS服务器后PUT请求返回HTTP Error 405.0 - Method Not Allowed 解决方法 转摘:http://blog.csdn.net/qiujuer/article/details/23827531
- Linux性能优化从入门到实战:01 Linux性能优化学习路线
- Window Server 2008 R2 FTP服务用户隔离
- 封装操作mysql、redis