6月5日的時候,修改dilated_seg.py(使用tensorflow)出現了報錯:

TypeError: Fetch argument 0 has invalid type <type 'int'>, must be a string or Tensor. (Can not convert a int into a Tensor or Operation.)

檢查後發現,是在定義了
acc_value =tf.reduce_mean(tf.keras.metrics.binary_accuracy(y_true=labels_tf, y_pred=output))
後,我還加了一句acc_value = 0.
把acc_value = 0 刪除了就不再報錯了

TypeError: Fetch argument 0 has invalid type <type 'int'>, must be a string or Tensor. (Can not convert a int into a Tensor or Operation.)的更多相关文章

  1. TypeError: Fetch argument 0.484375 has invalid type <class 'numpy.float32'>, must be a string or Tensor. (Can not convert a float32 into a Tensor or Operation.)

    报错: TypeError: Fetch argument 0.484375 has invalid type <class 'numpy.float32'>, must be a str ...

  2. TypeError: Fetch argument None has invalid type <type 'NoneType'>

    (fetch, type(fetch)))TypeError: Fetch argument None has invalid type <type 'NoneType'> 我的解决方案是 ...

  3. 记录:tensoflow改错TypeError: Cannot interpret feed_dict key as Tensor: Can not convert a float into a Te

    错误描述: TypeError: Cannot interpret feed_dict key as Tensor: Can not convert a float into a Tensor. 改错 ...

  4. vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". Expected String with value "0", got Number with value 0.

    vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". ...

  5. Python super(Todo,self).__init__() TypeError: super() argument 1 must be type, not classobj

    示例如下 class A(): def __init__(self):pass class B(A): def __init__(self): super(A, self).__init__() 当调 ...

  6. mockito 异常Reason: java.io.IOException: invalid constant type: 18

    原因: mockito内部使用的javassit的版本不一致导致的,修改为一直版本即可. 异常内容: /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jd ...

  7. Reflections - Java 8 - invalid constant type

    异常说明 使用Reflections扫描的时候出现could not create class file from, 原因是invalid constant type: 18 异常堆栈: org.re ...

  8. 报错The "chunk" argument must be one of type string or Buffer. Received type object

    报错内容: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or ...

  9. vue调用组件,组件回调给data中的数组赋值,报错Invalid prop type check failed for prop value. Expecte

    报错信息: 代码信息:调用一个tree组件,选择一些信息 <componentsTree ref="typeTreeComponent" @treeCheck="t ...

随机推荐

  1. 【软件构造】-<笔记>-浅谈java中类的初始化过程

    编写java程序时,每创建一个新的对象,都会对对象的内容进行初始化. 每一个类的方法中的局部变量都有严格的初始化要求,因此假如写出下面的程序: void f(){ int i; i++; } 编译时就 ...

  2. lua 的 break

    break   ,退出最近的一层循环 return   , 一般用于函数,会直接退出所有的循环,或者判断,返回参数 ,,,} for key,value in pairs(tb) do while(t ...

  3. input输入框提交输入的值的方式

    给button添加点击事件,通过id(getElementById)获取输入框的value. 弹框提示如图

  4. .NET 使用 Azure Blob 存储图片或文件

    使用的是VS2017 一.先使用 NuGet 获取这两个包. 执行以下步骤: 在“解决方案资源管理器”中,右键单击你的项目并选择“管理 NuGet 包”. 1.在线搜索“WindowsAzure.St ...

  5. 在ubuntu下装python3.6

    Ubuntu 14.04 and 16.04 If you are using Ubuntu 14.04 or 16.04, you can use J Fernyhough's PPA at htt ...

  6. Elasticsearch-6.7.0系列-Joyce博客总目录

     官方英文文档地址:https://www.elastic.co/guide/index.html Elasticsearch博客目录 Elasticsearch-6.7.0系列(一)9200端口 . ...

  7. vue 跨域问题

    前段时间做一个vue打包成安卓和IOS的App,遇到了跨域问题,直接拿了之前项目的配置,却不起作用. import org.springframework.context.annotation.Con ...

  8. 使用sqlplus创建Oracle表空间

    登录 dos窗口输入以下命令:sqlplus  回车 提示输入用户名——即创建数据库实例时的用户名 ,用户名输入:sys as sysdba 密码.........回车登录 查看数据文件位置 接下来, ...

  9. ES timeout 的一些笔记

    首先解释下Timeout的作用: 比如,一个search,可能要10分钟才能搜完,那么,es就会等10分钟,直到结果出来.然而,在某些场景下,客户是等不了10分钟的.比如,淘宝搜东西的时候,客户宁可等 ...

  10. selenium常用的API

    打开浏览器 driver.get("http://www.baidu.com") 最大化浏览器 driver.maximize_window() 关闭浏览器 driver.quit ...