Skip to content

Instantly share code, notes, and snippets.

@lorenzob
Created April 15, 2017 09:14
Show Gist options
  • Save lorenzob/b6db5c6a160abefbb10e655f6960e3cd to your computer and use it in GitHub Desktop.
Save lorenzob/b6db5c6a160abefbb10e655f6960e3cd to your computer and use it in GitHub Desktop.
Convert openface models from x64 to arm binary format
#!/usr/bin/env th
--
-- Outputs the number of parameters in a network for a single image
-- in evaluation mode.
require 'torch'
require 'nn'
require 'dpnn'
-- binary to ascii
-- local net = torch.load('nn4.small2.v1.t7'):float()
-- torch.save('nn4.small2.v1.ascii.t7', net, 'ascii')
-- ascii to binary
local net = torch.load('nn4.small2.v1.ascii.t7', 'ascii'):float()
torch.save('nn4.small2.v1.arm.t7', net)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment