tensorflow的错误之Can not convert a float32 into a Tensor or Operation
_,train_loss,acc=self.sess.run([train_op,total_losses,acc],feed_dict=feed_dict)TypeError: Fetch argument 0.546875 has invalid type <class 'numpy.float32'>, must be a string or Tensor. (Can not convert a float32 into a Tensor or Operation.)
为什么呢,因为一个等式中的acc重名了;第一次运行后等式右边的acc变成了一个整数; 如下所示:
_,train_loss,acc=self.sess.run([train_op,total_losses,acc],feed_dict=feed_dict)
所以才会出现上述错误
tensorflow的错误之Can not convert a float32 into a Tensor or Operation相关推荐
- TypeError: Can not convert a float32 into a Tensor or Operation.
错误 TypeError: Can not convert a float32 into a Tensor or Operation. # 类型错误:不能将一个浮动32转换为一个张量或操作.TypeE ...
- Pycharm中运行yolov5-pytorch出现错误“TypeError: can‘t convert cuda:0 device type tensor to numpy....“
具体错误如下: TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the te ...
- TensorFlow 常见错误与解决方法——长期不定时更新
TensorFlow 常见错误与解决方法--长期不定时更新 参考文章: (1)TensorFlow 常见错误与解决方法--长期不定时更新 (2)https://www.cnblogs.com/seni ...
- [bug解决] TensorFlow安装错误:ERROR Cannot uninstall ‘wrapt‘
[bug解决] TensorFlow安装错误:ERROR: Cannot uninstall 'wrapt'. 问题描述: 根据官网安装教程安装TensorFlow时出现如下报错: ERROR: Ca ...
- can‘t convert cuda:0 device type tensor to numpy
can't convert cuda:0 device type tensor to numpy x是list,list内容是tensor cuda 代码: x = np.array(x) 则会报错: ...
- TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to
问题描述: Traceback (most recent call last):File "D:\rotation-yolov5-master\detect.py", line 1 ...
- jemalloc java_从源构建tensorflow遇到错误:规则'@jemalloc//:jemalloc'的C编译失败
错误:/usr/local/app/.cache/bazel/_bazel_mqq/51871d27dfe77ebce0294c6560736a2c/external/jemalloc/BUILD:1 ...
- 「Tensorflow」错误tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
环境 环境:docker 系统:ubuntu 18.04 显卡:rtx 1080ti tf-v: 1.15.0 跑神经网络模型,报了标题的错误 正文 错误截图如下: 解决办法: 在入口文件的impor ...
- tensorflow编码错误:TypeError: unsupported operand type(s) for *: ‘float‘ and ‘NoneType‘
tensorflow 编码出现错误:TypeError: unsupported operand type(s) for *: 'float' and 'NoneType' 原码如下: import ...
最新文章
- 【SLAM后端】—— ceres优化相机位姿求解
- 岳阳师范学院计算机系刘威,计算机学院青年教师刘威博士发表高水平科研论文...
- 工作68:json校验工具
- Redis学习---(9)Redis 列表(List)
- 特斯拉股价周一大跌8.55% 市值缩水640亿美元
- 为什么有人说Java开发不再吃香
- 在WPF中开启摄像头扫描二维码(Media+Zxing)
- 傲澜智伴机器人_通辽智伴机器人,智伴机器人招商,傲澜智伴机器人
- 安信可经验分享 | WiFi保持连接状态下低功耗的实现,适用于ESP32/ESP32C3/ESP32S3系列模组二次开发
- Could not run ‘aten::slow_conv3d_forward‘ with arguments from the ‘CUDA‘ bac
- 北京市211学校计算机专业,北京较容易考的2所211大学,王牌专业实力强悍,学生不愁就业...
- 目标检测任务超大图像的切图实现
- HDOJ 1197 Specialized Four-Digit Numbers 特别的四位数
- layui搭建后台管理框架
- 立创eda学习笔记二十:查找相似对象和批量修改
- tracert命令介绍
- uipath 执行 insert 语句报 “语法错误“ 的问题解决
- ActiveMQ开发简明教程
- 基于微信小程序的健身私教预约系统
- html图片如何复制到剪贴板,js 如何实现复制图片到剪切板
热门文章
- Python中的itertools.product
- python是烂语言吗
- android 设置窗口透明效果,android - 如何将对话框窗口背景设置为透明,而不影响其边距...
- bootstrapmodel确认操作框_提醒!2020国考报名确认最后一天!错过无法参加笔试
- 【今日头条】热文周榜、热搜榜
- python PyQt5 QtCore.QPointF类、QPointF类与QPoint类区别
- C/C++ 回调函数是什么?Intel Realsense里的回调(callback)是什么?
- Ubuntu16.04安装ros残缺包
- Array Elimination 运算,gcd,思维
- JVM PrintGCDetails打印GC细节