matio/mattorch


matlab生成的数据是 mat格式的,需要转换成torch使用的 t7格式。可以使用 mattorch实现,但我在OS X 系统中总是安装出错。

matio也可以实现matlab数据和torch数据的转换,matio-ffi

matio

安装

笔主2018年11月按GitHub上步骤安装出错。
#OSX
brew install homebrew/science/libmatio
#Ubuntu
sudo apt-get install libmatio2

luarocks install matio

错误如下:

Error: homebrew/science was deprecated. This tap is now empty as all its formulae were migrated.

出现的原因是homebrew/science的git路径变了(貌似是2018年3月更新)。

这个homebrew community discussion 提到的:

The formulae in Homebrew/science have been copied over (but are not maintained) at https://github.com/brewsci/homebrew-science . A new tap for bioinformatics formulae at https://github.com/brewsci/homebrew-bio.
? brew tap brewsci/bio
? brew tap brewsci/science
? brew untap homebrew/science

最终解决方案:
首先
brew tap brewsci/science
brew install libmatio
最后
luarocks install matio

使用

Load a tensor from matlab array

local matio = require '
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值