在MacBook Pro(M1芯片)上获取MXNET安装问题

发布于 2025-02-06 18:45:35 字数 1348 浏览 1 评论 0 原文

我正在使用M1芯片(2020)的MacBook Pro。我尝试使用以下命令在jupyter笔记本(miniforge)上安装 mxnet

!pip3 install mxnet opencv-python

运行命令后,它安装了mxnet版本 1.6 .0

Requirement already satisfied: mxnet in /opt/homebrew/Caskroom/miniforge/base/envs/python_env/lib/python3.8/site-packages (1.6.0)
Requirement already satisfied: opencv-python in /opt/homebrew/Caskroom/miniforge/base/envs/python_env/lib/python3.8/site-packages (4.5.5.64) 

但是,当我尝试运行 IM2REC 以生成培训数据集的列表文件(90%)和验证数据集(10%)[参考:Julien Simon的Sagemaker Book]

python3 IM2Rec。 py- list-recursive-train-ratio 0.9dogscats。

我有一个错误:

之后,我卸载了 mxnet 使用 pip卸载mxnet 和clone mxnet repo repo来自 github ,我能够运行上述命令。

2

当我运行此命令

时8 dogscats。

我有以下错误:

record = mx.recordio.mxindexedRecordio(os.path.join(working_dir, fname_idx),attributeError:模块'mxnet'没有属性'recordio'

任何人都可以指导我如何使用M1芯片处理器上的MacBook Pro上使用GPU支持安装MXNET?

I am using MacBook Pro with M1 Chip (2020). I tried to install mxnet on jupyter notebook (miniforge) using the following command:

!pip3 install mxnet opencv-python

After running the command, it installed mxnet version 1.6.0.

Requirement already satisfied: mxnet in /opt/homebrew/Caskroom/miniforge/base/envs/python_env/lib/python3.8/site-packages (1.6.0)
Requirement already satisfied: opencv-python in /opt/homebrew/Caskroom/miniforge/base/envs/python_env/lib/python3.8/site-packages (4.5.5.64) 

But when I tried to run im2rec to generate list files for the training dataset (90%) and the validation dataset (10%) [Reference: Sagemaker book by Julien Simon]

!python3 im2rec.py --list --recursive --train-ratio 0.9 dogscats .

I got this error:

1

After that I uninstalled the mxnet using pip uninstall mxnet and clone mxnet repo from github, I was able to run the above command.

2

When I run this command:

!python3 im2rec.py --num-thread 8 dogscats .

I got the following error:

record = mx.recordio.MXIndexedRecordIO(os.path.join(working_dir,
fname_idx), AttributeError: module 'mxnet' has no attribute 'recordio'

Could anyone please guide me how to install mxnet using GPU support on Macbook Pro with M1 Chip Processor?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文