python - MXNET 重塑调用 ctypes
问题描述
在这里尝试使用“The Straight Dope”学习 MXNET。在线性代数 - 张量上,运行时出现 ctypes 错误,
X = nd.arange(24).reshape((2, 3, 4))
错误是,
C:\Anaconda2\lib\site-packages\mxnet\ndarray\ndarray.pyc in reshape(self, *shape, **kwargs)
1060 c_array(ctypes.c_int64, shape),
1061 reverse,
-> 1062 ctypes.byref(handle)))
1063 return NDArray(handle=handle, writable=self.writable)
1064
WindowsError: exception: access violation writing 0x00007FFB00000000
为什么会发生这种情况,我该如何解决?
解决方案
在这里讨论了解决方案:https ://discuss.mxnet.io/t/reshape-error-calling-ctypes/1245/3
有帮助的是降级到 mxnet 1.2.0 并升级到 Python 2.7.15。
推荐阅读
- regex - RegEx 可与 kotlin 一起使用,但无法与 dart 一起使用
- regex - 如何只在模式中使用一次输入?
- typescript - 错误 TS2345:类型参数 '{ cluster: string; 加密:布尔值;}' 不可分配给“选项”类型的参数
- typescript - 找不到模块“vuetify/lib/framework”的声明文件
- python - python中的fillpoly属性有问题
- python - 为什么函数在嵌套函数中的 else 语句之后不返回?
- python - 有没有其他方法可以使用多个参数写入文件?
- javascript - 我在 forloop 中重置的变量没有改变
- javascript - 带有 React Hooks 的动态状态
- python - 无法安装“mediapipe”库