1、矩阵加法使用

a = np.random.random((3,3))
b = np.random.randint(0,9,(3,3))
ad = tf.add(a,b)

  

2、矩阵乘法注意

# tensorflow 使用矩阵乘法都必须使用相同类型的数据,否则报错。
a = np.random.random((5,3))
b = np.random.randint(0,9,(3,6))
c = tf.tensordot(a.astype(np.float),b.astype(np.float),axes=1)
print(c.numpy())

  

3、矩阵减法

a = np.random.random((3,3))
b = np.random.randint(0,9,(3,3))
ad = tf.subtract(a,b)

  

4、数的除法

d = tf.divide(9*2,3)
print(d.numpy())

  

最新文章

  1. SQL-类型转换函数
  2. [ES] 安装
  3. 插入排序-java
  4. Java数据结构的特点
  5. Dubbo入门实例--转载
  6. Asp.net 导入Excel数据
  7. bootstrap--组件之按钮式下拉菜单
  8. Automator 简单使用流程
  9. C++图形编程之graphics.h头文件
  10. shiro授权
  11. redux+saga+reducer
  12. Git服务器Gogs简易安装-Windows环境
  13. Git基本操作指令
  14. 最全面的 Spring 学习笔记
  15. 【转】C++ 11 并发指南一(C++ 11 多线程初探)
  16. HDU6095
  17. ArcGIS Server Rest 认证过程分析
  18. python - how to sort
  19. 解决debug到jdk源码时不能查看变量值的问题
  20. WPF基础学习笔记整理 (七) Binding绑定

热门文章

  1. Codeforces Round #605 (Div. 3) 比赛总结
  2. 【Python系列】Python自动发邮件脚本
  3. linux常见的操作指令
  4. vuex 管理状态
  5. Python 爬虫插件
  6. java数据结构1--数组、排序和Arrays工具类
  7. SQL结果统计 GROUP BY
  8. IDC装机检查思路
  9. Codeforces 939E Maximize ( 三分 || 二分 )
  10. 小样本学习Few-shot learning