ICode9

精准搜索请尝试: 精确搜索
  • UnityEditor 查找和获取内置资源2022-08-26 12:31:11

    Object[] UnityAssets = AssetDatabase.LoadAllAssetsAtPath("Resources/unity_builtin_extra"); foreach (var asset in UnityAssets) { Debug.Log(asset); } Debug.Log("==================================="); Debug.Log(Shader.Find("Spri

  • torch中乘法整理,*&torch.mul()&torch.mv()&torch.mm()&torch.dot()&@&torch.mutmal()2022-07-24 21:01:18

    *位置乘 符号*在pytorch中是按位置相乘,存在广播机制。 例子: vec1 = torch.arange(4) vec2 = torch.tensor([4,3,2,1]) mat1 = torch.arange(12).reshape(4,3) mat2 = torch.arange(12).reshape(3,4) print(vec1 * vec2) print(mat2 * vec1) print(mat1 * mat1) Output: tensor([

  • 311. Sparse Matrix Multiplication2022-04-19 08:32:10

    My first solution, time complexityO(m*n), where m is the cell number of mat1, and n is the cell number of mat2: class Solution { public int[][] multiply(int[][] mat1, int[][] mat2) { if(mat1==null||mat2==null||mat1.length==0||mat2.length==0)

  • 《机器学习实战》CART回归树源码问题:TypeError: list indices must be integers or slices, not tuple2022-01-27 21:03:23

    书中代码1: def binSplitDataSet(dataSet, feature, value): mat0 = dataSet[nonzero(dataSet[:,feature] > value)[0],:][0] mat1 = dataSet[nonzero(dataSet[:,feature] <= value)[0],:][0] return mat0,mat1 改成: def binSplitDataSet(dataSet, feature, valu

  • 2021杭电多校第五场1002(单位根反演)2021-08-27 22:02:55

    2021杭电多校第五场1002 Problem - 7013 (hdu.edu.cn) 题意: 给一个长度为 \(L\) 的字符串,包含前 \(k(k>=2)\) 个小写字母,可以得到不同的字符串有 \(k^L\) 种 对于每一对 \((i,j),(0\le i,j)\) ,找出包含 \(p\) 个 \('a'\) , \(q\) 个 \('b'\),满足 \(q\equiv i(mod\ n),p\equiv j(m

  • Python SymPy4:SymPy 线性代数2021-07-29 19:01:37

    1. 矩阵与行列式 1.1 定义矩阵 Matrix([行向量1, 行向量2, 行向量3...]) from sympy import * mat = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) print(mat)  1.2 矩阵运算 from sympy import * mat1 = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 10]]) mat2 = Matrix([[10, 1

  • PyTorch错误 torch.addmm RuntimeError: mat1 dim 1 must match mat2 dim 02021-03-27 15:57:07

    PyTorch错误 torch.addmm RuntimeError: mat1 dim 1 must match mat2 dim 0 flyfish 详细提示 File "python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/media/ubuntu/data/pyto

  • C++——Eigen库的学习(6)2021-01-13 16:59:32

    七、特殊的矩阵和向量 1.零阵与零向量 在Eigen中,定义零阵的函数是zeros(),有三种定义方式,如下示例代码: std::cout << "固定大小的数组:\n"; Array33f a1 = Array33f::Zero(); std::cout << a1 << "\n\n"; std::cout << "一维动态大小数组:\n"; ArrayXf a2 = ArrayXf::

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有