JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

BCEWithLogitsLoss报错RuntimeError: result type Float can't be cast to the desired output type Long

发布时间 2023-10-07 22:49:49作者: oneDonkey

loss = F.binary_cross_entropy_with_logits(input, target)

input错写成了Long类型,target错写成了Int类型

input与target需要的是float类型

    本栏目推荐文章
  • Chrome 浏览器插件 V3 版本 Manifest.json 文件中 Action 的类型(Types)、方法(Methods)和事件(Events)的属性和参数解析
  • vue报错:Module parse failed: Unexpected token (5:2) You may need an appropriate loader to handle this file type.
  • mybatis解决nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping:
  • 记录用<input type="file">取代<video><canvas>
  • SpringMVC中如何设置响应的Content-Type(源码分析)
  • 从content-type设置看Spring MVC处理header的一个坑
  • EF CodeFirst mysql 迁移异常Unable to create a 'DbContext' of type
  • pytorch反向传播错误解决:RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.
  • Teamcenter报错:值类型 PROP_typed_reference 不受支持。 未能在对象 (Fnd0LicenseInfo) 上进行操作。 实例在使用中。
  • pycharm运行 appium ios自动化,报错TypeError: __init__() got an unexpected keyword argument 'desired_capabilities'
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们