Created
April 15, 2017 09:14
-
-
Save lorenzob/b6db5c6a160abefbb10e655f6960e3cd to your computer and use it in GitHub Desktop.
Convert openface models from x64 to arm binary format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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