当前位置:网站首页>tf中tensor的大小输出
tf中tensor的大小输出
2022-08-02 08:17:00 【frostjsy】
import tensorflow as tf
logits=tf.constant([[1.0,2.0,3.0],[1.0,2.0,3.0],[1.0,2.0,3.0]])
labels = tf.constant([[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]])
logits_ = tf.reshape(logits, [-1, 1])
labels_ = tf.reshape(labels, [-1, 1])
print(logits.shape.as_list())
print(labels.shape.as_list())
print(logits_.shape.as_list())
print(labels_.shape.as_list())
输出
[3, 3]
[3, 3]
[9, 1]
[9, 1]
【1】 [TensorFlow笔记] 获取Tensor的维度(tf.shape(x)、x.shape和x.get_shape()的区别)_手撕机的博客-CSDN博客_获取tensor的shape
边栏推荐
- cas:139504-50-0 美登素DM1|Mertansine|
- 【论文阅读】Distilling the Knowledge in a Neural Network
- MySQL读写分离与主从延迟
- USACO美国信息学奥赛竞赛12月份开赛,中国学生备赛指南
- Redisson报异常attempt to unlock lock, not locked by current thread by node id解决方案
- Redisson实现分布式锁
- C语言_指针
- HCIP9_BGP增加实验
- 类和对象【下】
- Analysis of software testing technology How far is Turing test from us
猜你喜欢
C语言基础_共用体
HCIP笔记十六天
Biotin-EDA|CAS:111790-37-5| Ethylenediamine biotin
PostgreSQL learning summary (11) - PostgreSQL commonly used high-availability cluster solutions
查看变量的数据格式
MySQL读写分离与主从延迟
etcd implements large-scale service governance application combat
Three types of [OC learning notes] Block
Stop mental exhaustion Daily sharing
PyCharm usage tutorial (detailed version - graphic and text combination)
随机推荐
Axial Turbine Privacy Policy
下一个排列
商业智能平台BI 商业智能分析平台 如何选择合适的商业智能平台BI
【电子电路】长按键拉低电平,适用在有休眠机制的MCU但是没有看门狗,一个按键多个功能场景下使用
Biotin-C6-amine|N-biotinyl-1,6-hexanediamine|CAS: 65953-56-2
etcd实现大规模服务治理应用实战
Flink 系统性学习笔记系列
PyQt5 (a) PyQt5 installation and configuration, read from the folder and display images, simulation to generate the sketch image
[OC学习笔记]ARC与引用计数
UVM信息服务机制
MySQL Workbench 安装及使用
普林斯顿微积分读本03第二章--编程实现函数图像绘制、三角学回顾
HCIP笔记第十三天
Pycharm (1) the basic use of tutorial
PostgreSQL learning summary (11) - PostgreSQL commonly used high-availability cluster solutions
Analysis of software testing technology How far is Turing test from us
redis高阶使用之Redisson分布式锁源码解析
【开源项目】X-TRACK源码分析
redis-desktop-manager下载安装
oracle的sql改成mysql版本