使用机器学习框架TuriCreate出现的错误

 

跑这个教程的代码 如何用Python和深度神经网络寻找近似图片?,使用机器学习框架TuriCreate时出现了一些错误,这里记录一下。

 

1、

导入库 import turicreate as tc 的时候出现报错:

ImportError: libblas.so.3: cannot open shared object file: No such file or directory

这是缺少依赖项,解决办法:

Import Error · Issue #191 · apple/turicreate 

turicreate/INSTALL_ISSUES.md at master · apple/turicreate 

libblas and liblapack issues and speed, with SciPy and Ubuntu — Daniel Nouri's Blog 

 

2、

安装turicreate(pip install -U turicreate)时会顺便安装cpu 版本的mxnet,在执行如下代码时:

model = tc.image_similarity.create(data)

第一次使用会下载两个文件,一直下不动,卡在如下位置:

Downloading https://docs-assets.developer.apple.com/turicreate/models/resnet-50-symbol.json
Download completed: /var/tmp/model_cache/resnet-50-symbol.json
Downloading https://docs-assets.developer.apple.com/turicreate/models/resnet-50-0000.params

于是自己手动下载这两个文件,放到 /var/tmp/model_cache/ 目录下,也可以使用如下命令查看应该放到哪里。参考

tc.config.get_runtime_config()['TURI_CACHE_FILE_LOCATIONS']

 

3、

我使用的是GPU,执行上面那句又报错:

ERROR: Incomplete installation for leveraging GPUs for computations.
Please make sure you have CUDA installed and run the following line in
your terminal and try again:

    pip uninstall -y mxnet && pip install mxnet-cu100==1.4.0

Adjust 'cu100' depending on your CUDA version ('cu90' and 'cu80' are also available).
You can also disable GPU usage altogether by invoking turicreate.config.set_num_gpus(0)

根据提示先卸载,然后安装GPU版本的mxnet。

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值