-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
33 lines (27 loc) · 698 Bytes
/
README.txt
File metadata and controls
33 lines (27 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
This is mattorch version for lua 5.2
DEPENDENCIES:
Torch7 (www.torch.ch)
INSTALL:
First find "matlab_root" by following command in matlab command line
> matlabroot
Now install using following commands:
$ git clone https://github.com/vivkul/lua---mattorch.git
$ cd lua---mattorch
$ mkdir build
$ cd build
$ cmake -DMATLAB_ROOT=matlab_root ..
$ cd ..
$ luarocks make
USE:
$ th
> require 'mattorch'
-- save:
> tensor1 = torch.Tensor(...)
> tensor2 = torch.Tensor(...)
> tensor3 = torch.Tensor(...)
> mattorch.save('output.mat', tensor1)
-- OR
> list = {myvar = tensor1, othervar = tensor2, thisvar = tensor3}
> mattorch.save('output.mat', list) ]]
-- load:
> loaded = mattorch.load('input.mat')