Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 275 Bytes
FILENAME = "neural_network.asc"
function serialize_nn(network)
local fout = torch.DiskFile(FILENAME, "w"):ascii()
fout:writeObject(network)
fout:close()
end
function deserialize_nn()
local fin = torch.DiskFile(FILENAME, "r")
return fin:readObject()
end