当前位置:网站首页>TF中的四则运算
TF中的四则运算
2022-08-11 06:45:00 【phac123】
只有维度相同的张量才可以做四则运算
import tensorflow as tf
a = tf.ones([1, 3])
b = tf.fill([1, 3], 3.)
print("a: ", a)
print("b: ", b)
print("a + b: ", tf.add(a, b))
print("a - b: ", tf.subtract(a, b))
print("a * b: ", tf.multiply(a, b))
print("b / a: ", tf.divide(b, a))
边栏推荐
- Unity程序员如何提升自己的能力
- Pico neo3 Unity打包设置
- golang fork 进程的三种方式
- 机器学习总结(二)
- 为什么我使用C#操作MySQL进行中文查询失败
- 公牛10-11德里克·罗斯最强赛季记录
- 基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
- 已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- 【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
- Do not add the is prefix to the variables of the boolean type in the POJO class of the Alibaba specification
猜你喜欢
Amazon Get AMAZON Product Details API Return Value Description
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
【预约观看】Ambire 智能钱包 AMA 活动第四期即将举行
【Pytorch】nn.Linear,nn.Conv
Daily sql: request for friend application pass rate
恒源云-Pycharm远程训练避坑指南
Discourse 的关闭主题(Close Topic )和重新开放主题
Tidb二进制集群搭建
【LeetCode每日一题】——682.棒球比赛
Redis测试
随机推荐
微信小程序功能上新(2022.06.01~2022.08.04)
ssh服务攻防与加固
matplotlib
伦敦银规则有哪些?
Amazon Get AMAZON Product Details API Return Value Description
Multiscale communication in cortical-cortical networks
皮质-皮质网络的多尺度交流
ROS 服务通信理论模型
Attitude solution - gyroscope + Euler method
Taobao API common interface and acquisition method
Unity3D learning route?
Cobbleland 博览会 基础系列 1
【LeetCode每日一题】——682.棒球比赛
radix-4 FFT principle and C language code implementation
关于Android Service服务的面试题
A used in the study of EEG ultra scanning analysis process
Taobao API interface reference
Pico neo3在Unity中的交互操作
DDR4内存条电路设计
【LeetCode每日一题】——844.比较含退格的字符串