`TypeError: torch.mm received an invalid combination of arguments - got (torch.FloatTensor, Variable), but expected one of:

    • (torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
    • (torch.FloatTensor source, torch.FloatTensor mat2)

They can, but a function takes either Tensors or Variables as input but not a mix of them.
You should wrap your tensor into a Variable before using it.

不管是张量还是变量都行,但是混合的就不行。

参考:https://github.com/pytorch/pytorch/issues/1252

`TypeError: torch.mm received an invalid combination of arguments - got (torch.FloatTensor, Variable),的更多相关文章

  1. Received an invalid response. Origin 'null' is therefore not allowed access

    Received an invalid response. Origin 'null' is therefore not allowed access. 今天在做二级联动,使用ajax请求xml数据, ...

  2. 502 Proxy Error The proxy server received an invalid response from an upstream server

    Proxy Error The proxy server received an invalid response from an upstream server. The proxy server ...

  3. tengine2.2.3报错502的The proxy server received an invalid response from an upstream server问题处理

    tengine2.2.3报错502的The proxy server received an invalid response from an upstream server问题处理 现象:访问订单的 ...

  4. 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.)

    6月5日的時候,修改dilated_seg.py(使用tensorflow)出現了報錯: TypeError: Fetch argument 0 has invalid type <type ' ...

  5. SqlBulkCopy 之 Received an invalid column length from the bcp client for colid 5.

    SqlBulkCopy 批量复制报错: Received an invalid column length from the bcp client for colid 5. 翻译:从bcp客户端收到一 ...

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

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

  7. 启动keepalived报错(VI_1): received an invalid passwd!

    一.署keepalived后测试主down掉后无法自动切换到备 查看message日志一直报此错误 [root@lb-nginx-master ~]# tailf /var/log/messages ...

  8. keepalived启动后报错:(VI_1): received an invalid passwd!的解决办法

    一.配置好keepalived.conf文件后,启动keepalived,查看/var/log/message日志报错: [root@push-- sbin]# tail -f /var/log/me ...

  9. [nginx]invalid number of arguments

    invalid number of arguments nginx出现以下的错误,基本上错误的原因就是少了后面的分号导致. invalid number of arguments

随机推荐

  1. Codeforces 803C. Maximal GCD

    题目链接:http://codeforces.com/contest/803/problem/C 中了若干trick之后才过... k个数的严格递增序列最小权值和就是${n*(n+1)/2}$,枚举这 ...

  2. 大数据Hadoop——初识Hadoop

    Hadoop简介 官方网站:  http://hadoop.apache.org/ 中文网站:  http://hadoop.apache.org/docs/r1.0.4/cn/ Hadoop设计来源 ...

  3. 在单机Docker上安装 Traefik 反向代理-负载均衡器

    一.创建Traefik和容器应用的连接网络 sudo docker network create traefik-net 二.下载Traefik样本配置文件wget https://raw.githu ...

  4. js查找、自组织数据

    function search(arr, data) { ; i < arr.length; ++i) { if (arr[i] == data) { return true; } } retu ...

  5. php输出语句有什么不同

    print()函数: 输出一个或者多个字符串.同echo一样,实际上它并不是一个函数.print有返回值.而echo没有.当其执行失败时返回false,成功 则返回true,速度比echo稍慢.只能打 ...

  6. 《R语言入门与实践》第一章:R基础

    前言 本章介绍了 R 语言的基础知识 界面: 使用命令 “ R “进行命令行的实时编译 对象 定义: 用于储存数据的,设定一个名称 格式: a <- 1:6 命名规则: 规则1:不能以数字开头规 ...

  7. python 学习笔记 3 ----> dive into python 3

    Python内置数据类型 注意: Python可以不需要声明变量的数据类型.它是根据变量的初始赋值情况分析数据类型,并在内部跟踪变量. 比较重要的数据类型: 1 布尔型(Booleans):True. ...

  8. Expression基础体验

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; usin ...

  9. python 读取excel文件

    方法一:利用pandas import pandas as pd inputfile_1 = "F:\\大论文实验\\福贡县数据\\贫困人口数据_2015.xlsx" data1 ...

  10. Linux Mint 18.1 MAME 成功运行

    折腾了一个下午,终于成功可以用手柄接着chromebook 来玩街机游戏了(灌篮高手.拳皇.突击骑兵) 在http://sdlmame.wallyweek.org/download/ 下载对应的mam ...