Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
1adrianb committed Mar 2, 2017
1 parent e5f5414 commit b9456b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -31,7 +31,7 @@ cd bnn.torch/; luarocks make; cd ..;

Install the modified optnet package
```bash
cd optimize-net/; luarocks make; cd ..;
cd optimize-net/; luarocks make rocks/optnet-scm-1.rockspec; cd ..;
```

Run the following command to prepare the files required by the demo. This will download 10 images from the MPII dataset alongside the dataset structure converted to .t7
Expand Down
7 changes: 5 additions & 2 deletions main.lua
Expand Up @@ -4,7 +4,7 @@ require 'cudnn'
require 'paths'

require 'bnn'
require 'optim'
local optnet = require 'optnet'

require 'gnuplot'
require 'image'
Expand All @@ -16,13 +16,16 @@ torch.setheaptracking(true)
torch.setdefaulttensortype('torch.FloatTensor')
torch.setnumthreads(1)

local model = torch.load('models/humanpose_binary.t7')
local model = torch.load('models/human_pose_binary.t7')
model:evaluate()

local fileLists = utils.getFileList(opts)
local predictions = {}
local output = torch.CudaTensor(1,16,64,64)

optimize_opts = {inplace=true, reuseBuffers=true, mode='inference'}
optnet.optimizeMemory(model, torch.zeros(1,3,256,256):cuda(), optimize_opts)

if opts.mode == 'eval' then xlua.progress(0,#fileLists) end
for i = 1, #fileLists do
fileLists[i].image = 'dataset/mpii/images/'..fileLists[i].image
Expand Down

0 comments on commit b9456b8

Please sign in to comment.