上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 1. 报错如下: 发生异常: TypeError rsub() received an invalid combination of arguments - got (Tensor, numpy.ndarray), but expected one of: * (Tensor input, Tens 阅读全文
posted @ 2021-03-29 21:33 vv_869 阅读(5360) 评论(0) 推荐(0) 编辑
摘要: 1. 报错:'Tensor' object is not callable 2. 解决:https://blog.csdn.net/york1996/article/details/84037641 https://blog.csdn.net/suyulan123456/article/detail 阅读全文
posted @ 2021-03-29 14:56 vv_869 阅读(2698) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_36575363/article/details/110197172 https://blog.csdn.net/u012505617/article/details/107530252 阅读全文
posted @ 2021-03-29 09:35 vv_869 阅读(2318) 评论(0) 推荐(0) 编辑
摘要: 来自: https://blog.csdn.net/u013841196/article/details/89875121 ,欧式距离的2种实现。 https://blog.csdn.net/SanyHo/article/details/105803103 ,曼哈顿距离(L1范数)& 欧式距离(L2 阅读全文
posted @ 2021-03-18 11:03 vv_869 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 如题,安装opencv报错了,截图如下: 原因在于国外源太慢了,于是切换为清华源,如下: pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple 最后成功安装。 附一些镜像源: 1 清华:https://pypi.t 阅读全文
posted @ 2021-03-13 17:17 vv_869 阅读(900) 评论(0) 推荐(0) 编辑
摘要: LeetCode168:168. Excel表列名称 - 力扣(LeetCode) (leetcode-cn.com) 看了题解,计算除以26的商和余数,利用ASCII码从最后一位依次往前计算。 目前还有一点不明白,第5行。 1 class Solution: 2 def convertToTitl 阅读全文
posted @ 2021-02-24 21:10 vv_869 阅读(221) 评论(0) 推荐(0) 编辑
摘要: torch.mul作element-wise的矩阵点乘,维数不限,可以矩阵乘标量 点乘都是broadcast的,可以用 torch.mul(a, b) 实现,也可以直接用 * 实现。 当a, b维度不一致时,会自动填充到相同维度相点乘。 1 import torch 2 3 a = torch.on 阅读全文
posted @ 2021-02-23 22:39 vv_869 阅读(6943) 评论(0) 推荐(1) 编辑
摘要: LeetCode136:https://leetcode-cn.com/problems/single-number/submissions/ 解题思路:参考题解,利用异或 。即将所有数字异或,然后相同的数字消除为0,剩下的即为所求。 1 class Solution: 2 def singleNu 阅读全文
posted @ 2021-02-20 17:07 vv_869 阅读(82) 评论(0) 推荐(0) 编辑
摘要: LeetCode119:https://leetcode-cn.com/problems/pascals-triangle-ii/submissions/ 解题思路:在原来LeetCode118的基础上稍微修改了一下。 1 class Solution: 2 def getRow(self, row 阅读全文
posted @ 2021-02-19 17:38 vv_869 阅读(108) 评论(0) 推荐(0) 编辑
摘要: LeetCode67:https://leetcode-cn.com/problems/add-binary/submissions/ 思路:利用内置函数 1 class Solution: 2 def addBinary(self, a: str, b: str) -> str: 3 return 阅读全文
posted @ 2021-02-19 16:45 vv_869 阅读(72) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页