- 博客(6)
- 收藏
- 关注
原创 C++ 迷之virtual
父类的成员函数不加virtual时,访问的还是父类的成员函数,而不是子类同名的成员函数;没有添加virtual关键字,则编译器直接按照类型来调用对应的函数,不会考虑多态特性。实际要看report()中传入的是哪一个类的引用。在学多态的时候遇到了问题。
2022-10-08 02:45:56
350
原创 TypeError: forward() takes 2 positional arguments but 3 were given
PyTorch向forward()传参,明明传入了正确数量的参数,却报错参数量不对?
2022-06-26 21:48:01
12488
5
原创 @functools.lru_cache 报错 unhashable type:‘list‘
@functools.lru_cache 报错 unhashable type:'list'
2022-06-19 03:57:15
1275
1
翻译 LaTeX element-wise tensor product 乘积符号⊗
参考: Latex tensor product - math-linux.com\otimes 或者 \bigotimes例子:$$\mathbf{v}=\left[\begin{array}{c}v_{1} \\v_{2} \\\vdots \\v_{n}\end{array}\right], \mathbf{w}=\left[\begin{array}{c}w_{1} \\w_{2} \\\vdots \\w_{m}\end{array}\right]$$T.
2022-05-08 02:40:59
1673
原创 RuntimeError: “topk_cpu“not implemented for ‘Half‘
RuntimeError:"topk_cpu"not implemented for 'Half'
2022-04-30 03:45:26
3741
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人