当前位置:网站首页>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
边栏推荐
- What is the function of the import command of the page directive in JSP?
- Elasticserch 自定义字段,用户会频繁的创建和删除字段,怎么设计mapping?
- USACO美国信息学奥赛竞赛12月份开赛,中国学生备赛指南
- oracle的sql改成mysql版本
- HCIP9_BGP增加实验
- pnpm的安装与使用
- 小说里的编程 【连载之二十一】元宇宙里月亮弯弯
- A young man with strong blood and energy actually became a housekeeper. How did he successfully turn around and change careers?
- R语言plotly可视化:plotly可视化回归模型实际值和回归预测值的散点图分析回归模型的预测效能、一个好的模型大部分的散点在对角线附近(predicted vs actual)
- BGP solves routing black hole through MPLS
猜你喜欢

Redisson报异常attempt to unlock lock, not locked by current thread by node id解决方案

Biotin-EDA|CAS:111790-37-5| 乙二胺生物素

EPSANet: An Efficient Pyramid Split Attention Block on Convolutional Neural Network

houdini 求出曲线的法向 切线以及副法线

MySQL Workbench 安装及使用

(Note)阿克西斯ACASIS DT-3608双盘位硬盘阵列盒RAID设置

etcd implements large-scale service governance application combat

prometheus monitoring mysql_galera cluster

mysql 中 in 的用法

A young man with strong blood and energy actually became a housekeeper. How did he successfully turn around and change careers?
随机推荐
Redisson的看门狗机制
C语言_指针
构建Flink第一个应用程序
Biotin-LC-Hydrazide|CAS:109276-34-8|生物素-LC-酰肼
Biotinyl Cystamine | CAS: 128915-82-2 | biotin cysteamine
In a recent build figure SLAM, and locate the progress
C语言基础_共用体
Pycharm (1) the basic use of tutorial
Mysql Mac版下载安装教程
USACO美国信息学奥赛竞赛12月份开赛,中国学生备赛指南
The custom table form
next permutation
Wang Xuegang - compiled shipment line file
PostgreSQL learning summary (11) - PostgreSQL commonly used high-availability cluster solutions
prometheus监控mysql_galera集群
TiFlash 存储层概览
Ansible learning summary (11) - detailed explanation of forks and serial parameters of task parallel execution
那些年我们踩过的 Flink 坑系列
Flink 系统性学习笔记系列
Analysis of software testing technology How far is Turing test from us