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 ]]

最新文章

  1. 【C#进阶系列】29 混合线程同步构造
  2. 1.linux服务器的性能分析与优化
  3. iOS 取绝对值函数
  4. 在项目中引用GreenDroid库
  5. Spring学习笔记之Bean的一些属性设置
  6. 获取XML数据
  7. trate
  8. 使用strut2要注意的问题
  9. Linux c 内存高速访问
  10. IIS部署新网站
  11. [译]ASP.NET Core 2.0 路由引擎
  12. (一二三)基于GCD的dispatch_once实现单例设计
  13. 低版本Flume兼容高版本elasticsearch
  14. hMailServer安装汉化方法
  15. Centos7静默安装Weblogic12C
  16. “每日一道面试题”.Net中所有类的基类是以及包含的方法
  17. leetcode771
  18. PHP引用赋值
  19. tomcat catalina.out日志切割(logrotate)
  20. 减少存储过程封装业务逻辑-web开发与传统软件开发的思维模式不同

热门文章

  1. SpringBoot 参数检查 Controller中检查参数是否合法
  2. SpringBoot 使用maven创建springboot项目
  3. [Web 前端] 012 css 元素溢出
  4. Golang环境配置
  5. Python库指南
  6. 回溯---Permutations II
  7. [环境搭建]-Web Api搭建到IIS服务器后PUT请求返回HTTP Error 405.0 - Method Not Allowed 解决方法 转摘:http://blog.csdn.net/qiujuer/article/details/23827531
  8. Linux性能优化从入门到实战:01 Linux性能优化学习路线
  9. Window Server 2008 R2 FTP服务用户隔离
  10. 封装操作mysql、redis