可能是一个非常愚蠢的问题,但我似乎找不到在 R 中创建稀疏对角矩阵的正确方法。我找到了函数:
diag.spam()spdiags()并将它们与下载的库Matrix和包一起使用spam,但 R 似乎无法识别这些函数。有人知道我需要下载的函数或库吗?
我需要它,因为我想创建大于 256 x 256 的对角矩阵。
我已经在这个问题上苦苦挣扎了 3 个小时,我尝试了多种 anaconda 环境,但它就是行不通。我正在尝试使用 tenforflow 版本 1.13.1,但无法将其安装到 pip install
这是我一直在使用的代码(在 jupyter 笔记本中)
!pip uninstall tensorflow -y
print('-----')
!pip install tensorflow==1.13.1
print('_____')
!pip install tensorflow-gpu==1.13.1
Run Code Online (Sandbox Code Playgroud)
我不断收到的错误如下:
WARNING: Skipping tensorflow as it is not installed.
-------
ERROR: Could not find a version that satisfies the requirement tensorflow==1.13.1 (from versions: 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1)
ERROR: No matching distribution found for tensorflow==1.13.1
_______
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.13.1 (from versions: none)
ERROR: …Run Code Online (Sandbox Code Playgroud)